From ff41ef271667a5f4db1484138349260be6132fd7 Mon Sep 17 00:00:00 2001 From: msnyder Date: Tue, 15 Mar 2011 17:54:24 +0000 Subject: [PATCH] 2011-03-04 Michael Snyder * stabsread.c (define_symbol): Guard against bad stabstring input. --- gdb/ChangeLog | 4 ++++ gdb/stabsread.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc78379840..c27cd8b1df 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-03-15 Michael Snyder + + * stabsread.c (define_symbol): Guard against bad stabstring input. + 2011-03-15 Pierre Muller Remove trailing spaces and tabulations from pascal language diff --git a/gdb/stabsread.c b/gdb/stabsread.c index bd8e12b8a2..c7d8a6c474 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. -- 2.11.0