Fix an illegal memory access parsing corrupt STABD debug information.
authorNick Clifton <nickc@redhat.com>
Tue, 14 Feb 2017 14:17:09 +0000 (14:17 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 14 Feb 2017 14:17:09 +0000 (14:17 +0000)
PR binutils/21158
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
empty symbol name.

binutils/ChangeLog
binutils/rddbg.c

index 99774b6b934c503216d8610fae52bc83d066c766..4f9bdfa75dc9e5712883eb1362235df2f9178d8c 100644 (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
index ae25decd654e0c9e24b899539b9ba45e2d4fbbda..1d8c4471887c29877ef23d021b05bb5b22ca9c61 100644 (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)
            {
This page took 0.031314 seconds and 4 git commands to generate.