mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#21042 mysql client segfaults on importing a mysqldump export
- Use strmake, that will both protect the buffer and make sure it's terminated by a zero - Add test case client/mysql.cc: Use strmake instead of strxnmov as that function will make sure the string is terminated by 0 mysql-test/r/mysql.result: Update test result mysql-test/t/mysql.test: Add test case
This commit is contained in:
@@ -2858,7 +2858,7 @@ com_connect(String *buffer, char *line)
|
||||
bzero(buff, sizeof(buff));
|
||||
if (buffer)
|
||||
{
|
||||
strxnmov(buff, sizeof(buff), line, NullS);
|
||||
strmake(buff, line, sizeof(buff));
|
||||
tmp= get_arg(buff, 0);
|
||||
if (tmp && *tmp)
|
||||
{
|
||||
|
Reference in New Issue
Block a user