Fix seg fault objdumping a corrupt binary with an invalid sh_link field.
authorNick Clifton <nickc@redhat.com>
Mon, 9 May 2016 16:31:07 +0000 (17:31 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 9 May 2016 16:31:07 +0000 (17:31 +0100)
commit315350be6598235df12a0190a5a4c21447eead36
treeae9a90a664169c6c5a2d751226b9c2e083224442
parent9239bbd3a6bf901dba1c0170622c50c78f6d1096
Fix seg fault objdumping a corrupt binary with an invalid sh_link field.

PR binutils/20063
* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
field before accessing sections array.

* readelf.c (get_32bit_section_headers): Warn if an out of range
sh_link or sh_info field is encountered.
(get_64bit_section_headers): Likewise.
bfd/ChangeLog
bfd/elf.c
binutils/ChangeLog
binutils/readelf.c