From: Nick Clifton Date: Wed, 29 Nov 2017 17:12:12 +0000 (+0000) Subject: Check for a NULL symbol pointer when reading relocs from a COFF based file. X-Git-Tag: users/hjl/linux/release/2.29.51.0.1^2~10^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4581a1c7d304ce14e714b27522ebf3d0188d6543;p=thirdparty%2Fbinutils-gdb.git Check for a NULL symbol pointer when reading relocs from a COFF based file. PR 22509 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol pointer when processing relocs. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 601272dc801..c23ac598ad8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-11-29 Nick Clifton + + PR 22509 + * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol + pointer when processing relocs. + 2017-11-29 Stefan Stroe * po/Make-in (datadir): Define as @datadir@. diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 604ba6d8d91..d30cd58c4f3 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5335,7 +5335,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) #else cache_ptr->address = dst.r_vaddr; - if (dst.r_symndx != -1) + if (dst.r_symndx != -1 && symbols != NULL) { if (dst.r_symndx < 0 || dst.r_symndx >= obj_conv_table_size (abfd)) {