* objc-lang.c (selectors_info): Error on too long REGEXP.
+2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * objc-lang.c (selectors_info): Error on too long REGEXP.
+
2011-02-28 Michael Snyder <msnyder@vmware.com>
* linux-record.c (record_linux_system_call): Add missing
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