Commit db91b62
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
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14100 | 14100 | | |
14101 | 14101 | | |
14102 | 14102 | | |
14103 | | - | |
| 14103 | + | |
14104 | 14104 | | |
14105 | 14105 | | |
14106 | 14106 | | |
| |||
0 commit comments