2011-03-04 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 15 Mar 2011 17:54:27 +0000 (17:54 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 15 Mar 2011 17:54:27 +0000 (17:54 +0000)
* stabsread.c (define_symbol): Guard against bad stabstring input.

gdb/ChangeLog
gdb/stabsread.c

index bc78379..c27cd8b 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-15  Michael Snyder  <msnyder@vmware.com>
+
+       * stabsread.c (define_symbol): Guard against bad stabstring input.
+
 2011-03-15  Pierre Muller  <muller@ics.u-strasbg.fr>
 
        Remove trailing spaces and tabulations from pascal language
index bd8e12b..c7d8a6c 100644 (file)
@@ -636,6 +636,12 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
     {
       p += 2;
       p = strchr (p, ':');
+      if (p == NULL)
+       {
+         complaint (&symfile_complaints, 
+                    _("Bad stabs string '%s'"), string);
+         return NULL;
+       }
     }
 
   /* If a nameless stab entry, all we need is the type, not the symbol.