diff options
author | Nick Clifton <nickc@redhat.com> | 2017-02-14 14:17:09 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-02-14 14:17:09 +0000 |
commit | 92134dc19b4bf6407a88a306b771c9c6c88658d6 (patch) | |
tree | 77bbea6298d25c3d2b19f00d96ccf68ee7d2cbfa /binutils/rddbg.c | |
parent | a2dea0b20bc66a4c287c3c50002b8c3b3e9d953a (diff) | |
download | gdb-92134dc19b4bf6407a88a306b771c9c6c88658d6.zip gdb-92134dc19b4bf6407a88a306b771c9c6c88658d6.tar.gz gdb-92134dc19b4bf6407a88a306b771c9c6c88658d6.tar.bz2 |
Fix an illegal memory access parsing corrupt STABD debug information.
PR binutils/21158
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
empty symbol name.
Diffstat (limited to 'binutils/rddbg.c')
-rw-r--r-- | binutils/rddbg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/rddbg.c b/binutils/rddbg.c index ae25dec..1d8c447 100644 --- a/binutils/rddbg.c +++ b/binutils/rddbg.c @@ -299,7 +299,10 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount, *pfound = TRUE; s = i.name; + if (s == NULL || strlen (s) < 1) + return FALSE; f = NULL; + while (s[strlen (s) - 1] == '\\' && ps + 1 < symend) { |