diff options
author | 2009-08-09 09:44:21 +0000 | |
---|---|---|
committer | 2009-08-09 09:44:21 +0000 | |
commit | 3b49aa800e49bf63650c1710b97429d05a86a5b2 (patch) | |
tree | ed441761a098cf3f5d137094a01d48f1cd356103 | |
parent | Don't leak in the (rare) case of an invalid command at the end of a file not (diff) | |
download | wireguard-openbsd-3b49aa800e49bf63650c1710b97429d05a86a5b2.tar.xz wireguard-openbsd-3b49aa800e49bf63650c1710b97429d05a86a5b2.zip |
Do not access s[strlen(s) - 1] without checking first that s is not an
empty string.
-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; |