mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#21042 mysql client segfaults on importing a mysqldump export
- Use strxnmov to protect the "buff" variable from overrun
This commit is contained in:
@ -2858,7 +2858,7 @@ com_connect(String *buffer, char *line)
|
|||||||
bzero(buff, sizeof(buff));
|
bzero(buff, sizeof(buff));
|
||||||
if (buffer)
|
if (buffer)
|
||||||
{
|
{
|
||||||
strmov(buff, line);
|
strxnmov(buff, sizeof(buff), line, NullS);
|
||||||
tmp= get_arg(buff, 0);
|
tmp= get_arg(buff, 0);
|
||||||
if (tmp && *tmp)
|
if (tmp && *tmp)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user