1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix some segfaults that could occur in obscure circumstances where error messages contained characters that could be mistaken for printf format specifiers.

FossilOrigin-Name: f91471e7234db490f97298b1ccb8d6c7fc45b089
This commit is contained in:
dan
2010-10-21 15:12:44 +00:00
parent 3edd8a555d
commit 06b5db0e39
6 changed files with 38 additions and 24 deletions

View File

@ -677,5 +677,14 @@ do_test incrblob-8.7 {
execsql {SELECT b FROM t1 WHERE a = 314159}
} {etilqs}
# The following test case exposes an instance in the blob code where
# an error message was set using a call similar to sqlite3_mprintf(zErr),
# where zErr is an arbitrary string. This is no good if the string contains
# characters that can be mistaken for printf() formatting directives.
#
do_test incrblob-9.1 {
list [catch { db incrblob t1 "A tricky column name %s%s" 1 } msg] $msg
} {1 {no such column: "A tricky column name %s%s"}}
finish_test