mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
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.
This commit is contained in:
parent
b2a0d025e3
commit
c3508e602f
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue