summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index fc26a741632..ea2c8663bb1 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2920,7 +2920,11 @@ com_connect(String *buffer, char *line)
bzero(buff, sizeof(buff));
if (buffer)
{
- strmake(buff, line, sizeof(buff) - 1);
+ /*
+ Two null bytes are needed in the end of buff to allow
+ get_arg to find end of string the second time it's called.
+ */
+ strmake(buff, line, sizeof(buff)-2);
tmp= get_arg(buff, 0);
if (tmp && *tmp)
{