projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
catch out of range string offset in corrupt stab entry
[deliverable/binutils-gdb.git]
/
binutils
/
rddbg.c
diff --git
a/binutils/rddbg.c
b/binutils/rddbg.c
index 9428c37ad5ce713bf1c644e1cf317d6721892fc0..e26056e6cfc446adeee4c99cd3486a7886b8b529 100644
(file)
--- a/
binutils/rddbg.c
+++ b/
binutils/rddbg.c
@@
-185,7
+185,17
@@
read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
char *f, *s;
f = NULL;
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;
s = (char *) strings + stroff + strx;
+
while (s[strlen (s) - 1] == '\\'
&& stab + 12 < stabs + stabsize)
{
while (s[strlen (s) - 1] == '\\'
&& stab + 12 < stabs + stabsize)
{
This page took
0.026295 seconds
and
4
git commands to generate.