From e7e18ac405a3090b4a9689e9ff48ae866526121a Mon Sep 17 00:00:00 2001 From: "mattiasj@mattiasj-laptop.(none)" <> Date: Sun, 11 Nov 2007 22:30:01 +0100 Subject: [PATCH] Bug#30695: An apostrophe ' in the comment of the ADD PARTITION causes the Server to crash. Post-pushbuild fix Pushbuild genereted valgrind warnings. Changed function to safer variant. --- sql/sql_partition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index ac098d57c24..ad9eec1906a 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1866,7 +1866,7 @@ static int add_quoted_string(File fptr, const char *quotestr) String escapedstr; int err= add_string(fptr, "'"); err+= append_escaped(&escapedstr, &orgstr); - err+= add_string(fptr, escapedstr.c_ptr()); + err+= add_string(fptr, escapedstr.c_ptr_safe()); return err + add_string(fptr, "'"); }