From a49144c8c99ce94fb19cf8b0d26e9c8f5c4450fb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Jul 2006 12:28:49 +0200 Subject: [PATCH] Bug#21042 mysql client segfaults on importing a mysqldump export - Use strxnmov to protect the "buff" variable from overrun client/mysql.cc: Use strxnmov to protect the "buff" variable from overrun --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 22534324aca..5c0b5ce04fe 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2858,7 +2858,7 @@ com_connect(String *buffer, char *line) bzero(buff, sizeof(buff)); if (buffer) { - strmov(buff, line); + strxnmov(buff, sizeof(buff), line, NullS); tmp= get_arg(buff, 0); if (tmp && *tmp) {