]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Check for a NULL symbol pointer when reading relocs from a COFF based file.
authorNick Clifton <nickc@redhat.com>
Wed, 29 Nov 2017 17:12:12 +0000 (17:12 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 29 Nov 2017 17:12:12 +0000 (17:12 +0000)
PR 22509
* coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
pointer when processing relocs.

bfd/ChangeLog
bfd/coffcode.h

index 601272dc8011719965d5660eac1c6955748b6bee..c23ac598ad8be23684d05003fd592e51651e379d 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-29  Nick Clifton  <nickc@redhat.com>
+
+       PR 22509
+       * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
+       pointer when processing relocs.
+
 2017-11-29  Stefan Stroe  <stroestefan@gmail.com>
 
        * po/Make-in (datadir): Define as @datadir@.
index 604ba6d8d91784136f925feeee73200b17242305..d30cd58c4f32efbc3b61bfb7622c65189fb54d79 100644 (file)
@@ -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))
            {