mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
addr2line out of memory on fuzzed file
Another case of fuzzers finding the section size sanity checks are avoided with SHT_NOBITS sections. * dwarf2.c (read_section): Check that the DWARF section being read has contents.
This commit is contained in:
@ -705,6 +705,14 @@ read_section (bfd *abfd,
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((msec->flags & SEC_HAS_CONTENTS) == 0)
|
||||
{
|
||||
_bfd_error_handler (_("DWARF error: section %s has no contents"),
|
||||
section_name);
|
||||
bfd_set_error (bfd_error_no_contents);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_bfd_section_size_insane (abfd, msec))
|
||||
{
|
||||
/* PR 26946 */
|
||||
|
Reference in New Issue
Block a user