diff options
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/objc-lang.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c27cd8b..11378c0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Michael Snyder <msnyder@vmware.com> + * objc-lang.c (selectors_info): Check strchr for null result. + * stabsread.c (define_symbol): Guard against bad stabstring input. 2011-03-15 Pierre Muller <muller@ics.u-strasbg.fr> diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 90b881f..dfa5388 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -752,6 +752,13 @@ selectors_info (char *regexp, int from_tty) continue; /* Find selector part. */ name = (char *) strchr (name+2, ' '); + if (name == NULL) + { + complaint (&symfile_complaints, + _("Bad method name '%s'"), + SYMBOL_NATURAL_NAME (msymbol)); + continue; + } if (regexp == NULL || re_exec(++name) != 0) { char *mystart = name; |