mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
asan: elf.c:12621:18: applying zero offset to null pointer
That's this line in elf_parse_notes: while (p < buf + size) * elf.c (_bfd_elf_make_section_from_shdr): Don't call elf_parse_notes when sh_size is zero.
This commit is contained in:
@ -1110,7 +1110,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
|
|||||||
/* We do not parse the PT_NOTE segments as we are interested even in the
|
/* We do not parse the PT_NOTE segments as we are interested even in the
|
||||||
separate debug info files which may have the segments offsets corrupted.
|
separate debug info files which may have the segments offsets corrupted.
|
||||||
PT_NOTEs from the core files are currently not parsed using BFD. */
|
PT_NOTEs from the core files are currently not parsed using BFD. */
|
||||||
if (hdr->sh_type == SHT_NOTE)
|
if (hdr->sh_type == SHT_NOTE && hdr->sh_size != 0)
|
||||||
{
|
{
|
||||||
bfd_byte *contents;
|
bfd_byte *contents;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user