forked from Imagelibrary/binutils-gdb
catch out of range string offset in corrupt stab entry
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2000-03-27 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* rddbg.c (read_section_stabs_debugging_info): Catch out of range
|
||||
string offsets in corrupt stabs entries.
|
||||
|
||||
2000-03-27 Alan Modra <alan@linuxcare.com>
|
||||
|
||||
* readelf.c: Include elf/avr.h
|
||||
|
||||
@@ -185,7 +185,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
|
||||
char *f, *s;
|
||||
|
||||
f = NULL;
|
||||
|
||||
if (stroff + strx > strsize)
|
||||
{
|
||||
fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n",
|
||||
bfd_get_filename (abfd), names[i].secname,
|
||||
(stab - stabs) / 12, strx, type);
|
||||
continue;
|
||||
}
|
||||
|
||||
s = (char *) strings + stroff + strx;
|
||||
|
||||
while (s[strlen (s) - 1] == '\\'
|
||||
&& stab + 12 < stabs + stabsize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user