gdb/
* objc-lang.c (selectors_info): Error on too long REGEXP.
This commit is contained in:
parent
907b7f4fc8
commit
2093702991
2 changed files with 7 additions and 1 deletions
|
@ -720,7 +720,9 @@ selectors_info (char *regexp, int from_tty)
|
|||
strcpy(myregexp, ".*]");
|
||||
else
|
||||
{
|
||||
strncpy(myregexp, regexp, sizeof (myregexp) - 1);
|
||||
if (sizeof (myregexp) < strlen (regexp) + 1)
|
||||
error (_("Regexp is too long: %s"), regexp);
|
||||
strcpy(myregexp, regexp);
|
||||
if (myregexp[strlen(myregexp) - 1] == '$') /* end of selector */
|
||||
myregexp[strlen(myregexp) - 1] = ']'; /* end of method name */
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue