Fix: nm: SEGV at bfd/elf.c:2267 in _bfd_elf_get_dynamic_symbols
authorNick Clifton <nickc@redhat.com>
Thu, 5 Oct 2023 14:27:47 +0000 (15:27 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 5 Oct 2023 14:27:47 +0000 (15:27 +0100)
  PR 30904
  * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to see if the gnuchains array has been successfully created.

bfd/ChangeLog
bfd/elf.c

index 851b47606c48736b61164e28c3b82c6fe7e600a1..f44806fc34c1c593f9158333a47d1eed959bbd77 100644 (file)
@@ -1,3 +1,9 @@
+2023-10-05  Nick Clifton  <nickc@redhat.com>
+
+       PR 30904
+       * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to
+       see if the gnuchains array has been successfully created.
+
 2023-10-02  Nick Clifton  <nickc@redhat.com>
 
        * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use
index d5c570f4b8cc7acd4489e01a2e3aee7f66c4cd58..b5b0c69e09742592d772b93f2dd59becfdee37de 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2227,7 +2227,7 @@ _bfd_elf_get_dynamic_symbols (bfd *abfd, Elf_Internal_Phdr *phdr,
        goto error_return;
 
       gnuchains = get_hash_table_data (abfd, maxchain, 4, filesize);
-      if (gnubuckets == NULL)
+      if (gnuchains == NULL)
        goto error_return;
       ngnuchains = maxchain;