Skip to content

Commit db91b62

Browse files
committed
WL#8077 Extend mysql_real_escape() to be aware of the string type it's escaping for.
mysql_real_escape_string() function was found insecure when sql_mode was set to NO_BACKSLASH_ESCAPES. mysql_real_escape_string() function reports error when sql_mode is set to NO_BACKSLASH_ESCAPES. Newly introduced API function mysql_real_escape_string_quote() should be used instead. Additional char type parameter allows to specify, which character should be doubled. Doubled character is a quote character of the identifier or a string within a SQL query. tests/mysql_client_test.c Fixed test_bug21246 test - buffer overflow.
1 parent 720dd1e commit db91b62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/mysql_client_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14100,7 +14100,7 @@ static void test_bug10214()
1410014100
static void test_bug21246()
1410114101
{
1410214102
int len;
14103-
char out[10];
14103+
char out[11];
1410414104

1410514105
myheader("test_bug21246");
1410614106

0 commit comments

Comments
 (0)