From 345309aadd64b701426fe3b4f4184ae689feef06 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 5 Oct 2023 15:27:47 +0100 Subject: [PATCH] Fix: nm: SEGV at bfd/elf.c:2267 in _bfd_elf_get_dynamic_symbols 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 | 6 ++++++ bfd/elf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 851b47606c4..f44806fc34c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2023-10-05 Nick Clifton + + 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 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use diff --git a/bfd/elf.c b/bfd/elf.c index d5c570f4b8c..b5b0c69e097 100644 --- 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; -- 2.30.2