mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Fix for crashing mysqltest
client/mysqltest.c: Allocate one extra byte for string terminator in varname
This commit is contained in:
parent
2fe75c389b
commit
935ad7e8f3
1 changed files with 1 additions and 1 deletions
|
@ -4207,7 +4207,7 @@ static VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||
val_len = strlen(val) ;
|
||||
val_alloc_len = val_len + 16; /* room to grow */
|
||||
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
|
||||
+ name_len, MYF(MY_WME))))
|
||||
+ name_len+1, MYF(MY_WME))))
|
||||
die("Out of memory");
|
||||
|
||||
tmp_var->name = (name) ? (char*) tmp_var + sizeof(*tmp_var) : 0;
|
||||
|
|
Loading…
Reference in a new issue