From 681c238c3322badc3007f43243d4b9532e56e910 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 15 Mar 2011 17:54:27 +0000 Subject: 2011-03-04 Michael Snyder * stabsread.c (define_symbol): Guard against bad stabstring input. --- gdb/stabsread.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/stabsread.c') 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. -- cgit v1.1