summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-12-08 16:08:54 +0100
committermsvensson@neptunus.(none) <>2006-12-08 16:08:54 +0100
commit40927c0cb2a84743957f431f28e4d1b0f4dd6d51 (patch)
treefc743c92eaa8c2029bd7a29aa43c48dee4374ac5 /client
parent8b6e5d4dfae202a2ae9abb29496efc22656f38c8 (diff)
downloadmariadb-git-40927c0cb2a84743957f431f28e4d1b0f4dd6d51.tar.gz
Bug#24498 Stack overflow in mysqltest
- Thanks to Vasil Dimov for the patch!
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index c6cbf6aabe0..ac186a7361e 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1240,7 +1240,9 @@ void var_set(const char *var_name, const char *var_name_end,
v->int_dirty= 0;
v->str_val_len= strlen(v->str_val);
}
- strxmov(buf, v->name, "=", v->str_val, NullS);
+ my_snprintf(buf, sizeof(buf), "%.*s=%.*s",
+ v->name_len, v->name,
+ v->str_val_len, v->str_val);
if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
die("Out of memory");
putenv(v->env_s);