]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
asan: heap-buffer-overflow objdump.c:3299 in disassemble_bytes
authorAlan Modra <amodra@gmail.com>
Mon, 1 Apr 2024 09:28:53 +0000 (19:58 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 1 Apr 2024 10:51:51 +0000 (21:21 +1030)
commit159daa36fab5c2c0df88b6e9fd4cda4e560c3f9f
tree97e503ee4efcbb9e4f7081d575a156fba86f3f0e
parentb67a17aa7c0c478a2f2c2f045854e9745abfe114
asan: heap-buffer-overflow objdump.c:3299 in disassemble_bytes

Fix yet another crash, this one with a fuzzed function symbol size.
The patch also corrects objdump behaviour when both --disassemble=sym
and --stop-address=value are given.  Previously --disassemble=sym
overrode --stop-address, now we take the lower of the stop-address
value and the end of function.

* objdump.c (disassemble_section): Sanity check ELF st_size.
binutils/objdump.c