diff options
author | Nick Clifton <nickc@redhat.com> | 2017-11-29 17:12:12 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-12-16 23:35:59 +0100 |
commit | c3c1285fd0546a76cc7c22141d62850d4b531e16 (patch) | |
tree | 7ffae433cd2ec119d0c9cb091daddcdd305258f2 | |
parent | Prevent a memory exhaustion problem when trying to read in strings from a COF... (diff) | |
download | binutils-gdb-c3c1285fd0546a76cc7c22141d62850d4b531e16.tar.gz binutils-gdb-c3c1285fd0546a76cc7c22141d62850d4b531e16.tar.bz2 binutils-gdb-c3c1285fd0546a76cc7c22141d62850d4b531e16.zip |
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.
(cherry picked from commit 4581a1c7d304ce14e714b27522ebf3d0188d6543)
-rw-r--r-- | bfd/coffcode.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 1e5270eb23c..19f460cc592 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5326,7 +5326,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)) { |