mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
2011-02-27 Michael Snyder <msnyder@vmware.com>
* objc-lang.c (selectors_info): Prevent string overrun.
This commit is contained in:
@ -720,7 +720,7 @@ selectors_info (char *regexp, int from_tty)
|
||||
strcpy(myregexp, ".*]");
|
||||
else
|
||||
{
|
||||
strcpy(myregexp, regexp);
|
||||
strncpy(myregexp, regexp, sizeof (myregexp) - 1);
|
||||
if (myregexp[strlen(myregexp) - 1] == '$') /* end of selector */
|
||||
myregexp[strlen(myregexp) - 1] = ']'; /* end of method name */
|
||||
else
|
||||
|
Reference in New Issue
Block a user