mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
fix new String:realloc* variants always to zero-terminate the string
This commit is contained in:
@ -81,7 +81,7 @@ bool String::real_alloc(uint32 length)
|
||||
|
||||
@retval true An error occured when attempting to allocate memory.
|
||||
*/
|
||||
bool String::realloc(uint32 alloc_length)
|
||||
bool String::realloc_raw(uint32 alloc_length)
|
||||
{
|
||||
if (Alloced_length <= alloc_length)
|
||||
{
|
||||
@ -109,7 +109,6 @@ bool String::realloc(uint32 alloc_length)
|
||||
Ptr= new_ptr;
|
||||
Alloced_length= len;
|
||||
}
|
||||
Ptr[alloc_length]=0; // This make other funcs shorter
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user