Hi Tatiana,
On 4/7/09 8:44 AM, Tatiana A. Nurnberg wrote:
> #At file:///misc/mysql/forest/43884/51-43884/ based on
> revid:serge.kozlov@stripped
>
> 2857 Tatiana A. Nurnberg 2009-04-07
> Bug#43884: SP + filename param as TEXT + LOAD_FILE inside, causes valgrind
> warnings in PB
>
> We were trying to \0 terminate a string literal.
> valgrind rightfully didn't like that.
>
[..]
>
> - (void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
> + (void) fn_format(path, file_name->c_ptr_safe(), mysql_real_data_home, "",
> MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
>
> /* Read only allowed from within dir specified by secure_file_priv */
>
Hum, there are other functions on the same file using String::c_ptr().
Substituting LOAD(file) in the procedure with PASSWORD(file) seems to
yield the same valgrind warning.
I think we need to find out whether those items should be nul terminated
and/or fix all places where String::c_ptr() is used. In any case, it
would be interesting to make then nul terminated to avoid re-allocations.
Regards,
-- Davi Arnaut