diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-09 09:44:22 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-09 09:44:22 +0000 |
commit | 380d7112b68f9670e63c0ff0fbaf3cccb40e40b0 (patch) | |
tree | c83bc69fc59bfa5c06e14740971231c1f27b83b8 /gnu | |
parent | c895e6d88f1a41c252ca761f25f081a86c918417 (diff) |
Do not access s[strlen(s) - 1] without checking first that s is not an
empty string.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/binutils/rddbg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/binutils/rddbg.c b/gnu/usr.bin/binutils/binutils/rddbg.c index 75ddab54488..4abdd23d1dd 100644 --- a/gnu/usr.bin/binutils/binutils/rddbg.c +++ b/gnu/usr.bin/binutils/binutils/rddbg.c @@ -191,7 +191,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount, s = (char *) strings + stroff + strx; - while (s[strlen (s) - 1] == '\\' + while (*s != '\0' && s[strlen (s) - 1] == '\\' && stab + 12 < stabs + stabsize) { char *p; |