diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-15 17:54:27 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-15 17:54:27 +0000 |
commit | 681c238c3322badc3007f43243d4b9532e56e910 (patch) | |
tree | 0b3971999055daa69a7fb680dbf5149ecf77f8d8 /gdb/stabsread.c | |
parent | 959e74695a0c720db6f0f5c61d72d7db63a2ab6d (diff) | |
download | gdb-681c238c3322badc3007f43243d4b9532e56e910.zip gdb-681c238c3322badc3007f43243d4b9532e56e910.tar.gz gdb-681c238c3322badc3007f43243d4b9532e56e910.tar.bz2 |
2011-03-04 Michael Snyder <msnyder@vmware.com>
* stabsread.c (define_symbol): Guard against bad stabstring input.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index bd8e12b..c7d8a6c 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -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. |