]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/ChangeLog
PR26337, Malloc size error in objdump
authorAlan Modra <amodra@gmail.com>
Wed, 5 Aug 2020 00:33:00 +0000 (10:03 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Aug 2020 01:04:05 +0000 (10:34 +0930)
commit0b97e818464a42305c8243a980a5c13967554fd9
treeab9e326ba16cecab9599dc2ddc96ebdcc7ae86fd
parentb7563b2492962421e1795e2eca61beffbb45e08d
PR26337, Malloc size error in objdump

A malloc failure triggered by a fuzzed object file isn't a real
problem unless objdump doesn't exit cleanly after the failure, which
it does.  However we have bfd_malloc_and_get_section to sanity check
size of uncompressed sections before allocating memory.  Use it.

PR 26337
* objdump.c (load_specific_debug_section): Don't malloc space for
section contents, use bfd_malloc_and_get_section.
binutils/ChangeLog
binutils/objdump.c