mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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:
Bug#30695: An apostrophe ' in the comment of the ADD PARTITION
causes the Server to crash.
Fix for valgrind warning in pushbuild.
String.c_prt fcn is not as safe as comment says.
(gives valgrind errors in this case)
This commit is contained in:
@@ -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, "'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user