]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR27290, PR27293, PR27295, various avr objdump fixes
authorAlan Modra <amodra@gmail.com>
Thu, 11 Feb 2021 06:26:42 +0000 (16:56 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 11 Feb 2021 09:00:47 +0000 (19:30 +1030)
commit1cfcf3004e1830f8fe9112cfcd15285508d2c2b7
treecf35ec5d24a21747c7e5dab5d9e472f5aed0bde6
parent6db658c517bdfbf8e5b8c5a34caf3ff1eea332f1
PR27290, PR27293, PR27295, various avr objdump fixes

Adds missing sanity checks for avr device info note, to avoid
potential buffer overflows.  Uses bfd_malloc_and_get_section for
sanity checking section size.

PR 27290
PR 27293
PR 27295
* od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
Use bfd_malloc_and_get_section.
(elf32_avr_get_note_desc): Formatting.  Return descsz.  Sanity
check namesz.  Return NULL if descsz is too small.  Ensure
string table is terminated.
(elf32_avr_get_device_info): Formatting.  Add note_size param.
Sanity check note.
(elf32_avr_dump_mem_usage): Adjust to suit.
binutils/ChangeLog
binutils/od-elf32_avr.c