[commit] objc-lang.c, classes_info, avoid string overrun
Michael Snyder
msnyder@vmware.com
Tue Mar 1 18:51:00 GMT 2011
Yao Qi wrote:
> On 03/01/2011 09:46 AM, Michael Snyder wrote:
>> - if (sizeof (myregexp) < strlen (regexp) + 1)
>> + if (sizeof (myregexp) < strlen (regexp) + 4)
>> error (_("Regexp is too long: %s"), regexp);
>> strcpy(myregexp, regexp);
>
> It is a little bit confusing when people read this code. We may need a
> short comment here.
>
Okey dokey, see attached.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: comment.txt
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110301/6b0d26a1/attachment.txt>
More information about the Gdb-patches
mailing list