mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
gdb/
* objc-lang.c (selectors_info): Error on too long REGEXP.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user