aboutsummaryrefslogtreecommitdiff
path: root/gdb/objc-lang.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-01 18:51:06 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-01 18:51:06 +0000
commita9dc8dcca3ac5ca47940cd4e9d7138490bec3d06 (patch)
tree41389c52f5313b1b68ea3d186274a33aa1c6c858 /gdb/objc-lang.c
parent478fd957f7e66cd0ab23d2bbd2a96363d82579fd (diff)
downloadgdb-a9dc8dcca3ac5ca47940cd4e9d7138490bec3d06.zip
gdb-a9dc8dcca3ac5ca47940cd4e9d7138490bec3d06.tar.gz
gdb-a9dc8dcca3ac5ca47940cd4e9d7138490bec3d06.tar.bz2
2011-03-01 Michael Snyder <msnyder@vmware.com>
* objc-lang.c (selectors_info): Add explanitory comment. (classes_info): Ditto.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r--gdb/objc-lang.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index d656044..280751f 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -720,6 +720,7 @@ selectors_info (char *regexp, int from_tty)
strcpy(myregexp, ".*]");
else
{
+ /* Allow a few extra bytes because of the strcat below. */
if (sizeof (myregexp) < strlen (regexp) + 4)
error (_("Regexp is too long: %s"), regexp);
strcpy(myregexp, regexp);
@@ -863,6 +864,7 @@ classes_info (char *regexp, int from_tty)
strcpy(myregexp, ".* "); /* Null input: match all objc classes. */
else
{
+ /* Allow a few extra bytes because of the strcat below. */
if (sizeof (myregexp) < strlen (regexp) + 4)
error (_("Regexp is too long: %s"), regexp);
strcpy(myregexp, regexp);