diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-14 10:59:24 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-14 10:59:24 +0100 |
commit | 8404b44a845e8a827bf1986fe4450673782bfdae (patch) | |
tree | 97b171dcce85cb3f288d41d6de5f75234f099814 /sql/sql_string.cc | |
parent | 818af42f1de640f3951fcfde0cb9b7b76d06a01e (diff) | |
download | mariadb-git-8404b44a845e8a827bf1986fe4450673782bfdae.tar.gz |
fix new String:realloc* variants always to zero-terminate the string
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 6c772617e7b..47170e6c3db 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -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; } |