2011-02-27 Michael Snyder <msnyder@vmware.com>
* objc-lang.c (selectors_info): Prevent string overrun.
This commit is contained in:
parent
4b812f4ed9
commit
ae179fba63
|
@ -1,5 +1,7 @@
|
|||
2011-02-27 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* objc-lang.c (selectors_info): Prevent string overrun.
|
||||
|
||||
* tui/tui-stack.c (tui_get_function_from_frame): Fix off by one
|
||||
error in strncpy.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue