diff options
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index a7310c8..d82c89c 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2467,10 +2467,11 @@ process_debug_info (struct dwarf_section *section, (unsigned long) compunit.cu_abbrev_offset, (unsigned long) abbrev_size); /* PR 17531: file:4bcd9ce9. */ - else if (abbrev_base >= abbrev_size) - warn (_("Debug info is corrupted, abbrev base (%lx) is larger than abbrev section size (%lx)\n"), - (unsigned long) abbrev_base, - (unsigned long) abbrev_size); + else if ((abbrev_base + abbrev_size) + > debug_displays [abbrev_sec].section.size) + warn (_("Debug info is corrupted, abbrev size (%lx) is larger than abbrev section size (%lx)\n"), + (unsigned long) abbrev_base + abbrev_size, + (unsigned long) debug_displays [abbrev_sec].section.size); else process_abbrev_section (((unsigned char *) debug_displays [abbrev_sec].section.start |