1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Avoid an undefined integer overflow in fts3 by detecting data structure corruption earlier.

FossilOrigin-Name: 86e98ddc19470410ccc6d2cf4ad56ef0bc5a23b7fbe6331b8cae374689f54529
This commit is contained in:
dan
2020-03-20 20:18:49 +00:00
parent 589c787620
commit ec8e689a20
4 changed files with 27 additions and 9 deletions

View File

@ -303,4 +303,16 @@ do_execsql_test 9.2 {
-4764623217061966105 8324454597464624651
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 10.0 {
CREATE VIRTUAL TABLE f USING fts3(a,b);
CREATE TABLE 'f_stat'(id INTEGER PRIMARY KEY, value BLOB);
INSERT INTO f_stat VALUES (1,x'3b3b3b3b3b3b3b28ffffffffffffffffff1807f9073481f1d43bc93b3b3b3b3b3b3b3b3b3b18073b3b3b3b3b3b3b9b003b');
} {}
do_catchsql_test 10.1 {
INSERT INTO f(f) VALUES ('merge=69,59');
} {1 {database disk image is malformed}}
finish_test