[Mono-dev] [PATCH] NULL terminate new strings beyond the end (rather than last char)

Kornél Pál kornelpal at gmail.com
Wed Jul 12 06:24:46 EDT 2006


Hi,

Strings are allocated with an extra character. I think this is added to have 
a NULL at the end anyway. But when the allocated memory is not zero-filled 
by the GC, only the last character of the string is zeroed that can be and 
most likely will be overwritten.

Please review and approve the patch.

Kornél 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StringNull.diff
Type: application/octet-stream
Size: 342 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060712/d37aa0da/attachment.obj 


More information about the Mono-devel-list mailing list