summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-01-10 15:56:30 +0100
committerunknown <msvensson@neptunus.(none)>2006-01-10 15:56:30 +0100
commit935ad7e8f376805f435d6e105d337efb54a31379 (patch)
tree4fed84fe7882bb5fafbb77e3e1a130d995b2f0aa /client
parent2fe75c389bb3958e55e0d019bb4fbb19d7e5132d (diff)
downloadmariadb-git-935ad7e8f376805f435d6e105d337efb54a31379.tar.gz
Fix for crashing mysqltest
client/mysqltest.c: Allocate one extra byte for string terminator in varname
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index dbb910c2e3d..c31e8bc693b 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -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;