On Wed, May 27, 2009 at 5:52 AM, Paul McCullagh
<[email protected]> wrote:
> A recent change to the String class (sql_string.h) causes a crash or
> overwrite.
>
Out of curiosity, is this crash in a current test or something else
you were working on?

> It may not be safe because the user of c_ptr may not always be able to
> assume the zero terminator will remain zero.
>
> For this purpose we have String::c_ptr_safe().
>
Ideally, but there are places that call c_ptr and expect it to be null
terminated - the group_by and myisam tests are the ones I remember.
The original implementation always called String::realloc, which not
only allocates a larger buffer but also places a null terminator.

-Nathan

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to