diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-15 18:07:34 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-15 18:07:34 +0000 |
commit | 50412521e8708f30e84ebd7d01bda034daf6411c (patch) | |
tree | e004e13bec6a049a741bf23277a63bcd83437a6f /gdb/objc-lang.c | |
parent | 681c238c3322badc3007f43243d4b9532e56e910 (diff) | |
download | gdb-50412521e8708f30e84ebd7d01bda034daf6411c.zip gdb-50412521e8708f30e84ebd7d01bda034daf6411c.tar.gz gdb-50412521e8708f30e84ebd7d01bda034daf6411c.tar.bz2 |
2011-03-04 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* objc-lang.c (selectors_info): Check strchr for null result.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; |