summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorramil/ram@mysql.com/myoffice.izhnet.ru <>2006-08-29 14:38:02 +0500
committerramil/ram@mysql.com/myoffice.izhnet.ru <>2006-08-29 14:38:02 +0500
commitf25b8f20d21e15be7ca7eb71f3bbbed539924fc1 (patch)
treeb618535353b9f1ad26bd667a999e4ed1ea2fb27c /client
parent45460bd0afbf5f31111ee44f352622cd79402a0d (diff)
downloadmariadb-git-f25b8f20d21e15be7ca7eb71f3bbbed539924fc1.tar.gz
Fix for bug #21142: Malformed insert causes a segmentation fault.
- possible stack overflow fixed.
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 09818ae27b3..1a967ed8364 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2615,7 +2615,7 @@ com_connect(String *buffer, char *line)
bzero(buff, sizeof(buff));
if (buffer)
{
- strmov(buff, line);
+ strmake(buff, line, sizeof(buff) - 1);
tmp= get_arg(buff, 0);
if (tmp && *tmp)
{
@@ -2729,7 +2729,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
char *tmp, buff[FN_REFLEN + 1];
bzero(buff, sizeof(buff));
- strmov(buff, line);
+ strmake(buff, line, sizeof(buff) - 1);
tmp= get_arg(buff, 0);
if (!tmp || !*tmp)
{