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.
This commit is contained in:
Nick Clifton 2017-02-14 14:17:09 +00:00
parent a2dea0b20b
commit 92134dc19b
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21158
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
empty symbol name.
2017-02-14 Nick Clifton <nickc@redhat.com>
PR binutils/21157

View File

@ -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)
{