1
0
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 strmake, that will both protect the buffer and make sure it's terminated by a zero
 - Add test case
This commit is contained in:
msvensson@neptunus.(none)
2006-07-31 14:22:32 +02:00
parent d8a5ea2621
commit 2461e48698
3 changed files with 8 additions and 1 deletions

View File

@ -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)
{