diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-08-29 14:38:02 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-08-29 14:38:02 +0500 |
commit | c3508e602f55a309a785b27d95dd0cce8df909c7 (patch) | |
tree | b618535353b9f1ad26bd667a999e4ed1ea2fb27c /client/mysql.cc | |
parent | b2a0d025e3f3dc2a8e9ab83634f542d50c4f99a8 (diff) | |
download | mariadb-git-c3508e602f55a309a785b27d95dd0cce8df909c7.tar.gz |
Fix for bug #21142: Malformed insert causes a segmentation fault.
- possible stack overflow fixed.
client/mysql.cc:
Fix for bug #21142: Malformed insert causes a segmentation fault.
- as 'line' may be longer than 'buff' we must take into account its length.
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 4 |
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) { |