Stop objdump from attempting to allocate a huge chunk of memory when parsing relocs...
authorNick Clifton <nickc@redhat.com>
Wed, 29 Nov 2017 12:40:43 +0000 (12:40 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 29 Nov 2017 12:40:43 +0000 (12:40 +0000)
commitd785b7d4b877ed465d04072e17ca19d0f47d840f
treeb3e9d4dcae256ebfc82447e4a55bf9a609fd229e
parent08f650e6b657e59959d7db8af100720721bd10a2
Stop objdump from attempting to allocate a huge chunk of memory when parsing relocs in a corrupt file.

PR 22508
* objdump.c (dump_relocs_in_section): Also check the section's
relocation count to make sure that it is reasonable before
attempting to allocate space for the relocs.
binutils/ChangeLog
binutils/objdump.c