Skip to content

Commit 92134dc

Browse files
committed
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.
1 parent a2dea0b commit 92134dc

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎binutils/ChangeLog‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2017-02-14 Nick Clifton <nickc@redhat.com>
2+
3+
PR binutils/21158
4+
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
5+
empty symbol name.
6+
17
2017-02-14 Nick Clifton <nickc@redhat.com>
28

39
PR binutils/21157

‎binutils/rddbg.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
299299
*pfound = TRUE;
300300

301301
s = i.name;
302+
if (s == NULL || strlen (s) < 1)
303+
return FALSE;
302304
f = NULL;
305+
303306
while (s[strlen (s) - 1] == '\\'
304307
&& ps + 1 < symend)
305308
{

0 commit comments

Comments
 (0)