diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-28 02:14:50 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-28 02:14:50 +0000 |
commit | ae179fba639d227c015767db97740509515491f1 (patch) | |
tree | 150aa25557c160c0d6acc66deccb695f2a5ea996 /gdb/objc-lang.c | |
parent | 4b812f4ed9ec8dc933c5603f958b84495c41534f (diff) | |
download | gdb-ae179fba639d227c015767db97740509515491f1.zip gdb-ae179fba639d227c015767db97740509515491f1.tar.gz gdb-ae179fba639d227c015767db97740509515491f1.tar.bz2 |
2011-02-27 Michael Snyder <msnyder@vmware.com>
* objc-lang.c (selectors_info): Prevent string overrun.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 25e13be..d795104 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -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 |