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

In fts3, avoid making a very large memory allocation if the merge-hint record is corrupt.

FossilOrigin-Name: 9add58fe9688d5c1f675736e7f1c6ff7831d2ff6fdeb884a2e62c1bf9536ee50
This commit is contained in:
dan
2020-01-03 20:16:32 +00:00
parent 3b76c45a7f
commit e455e3acf0
4 changed files with 27 additions and 12 deletions

View File

@ -5812,4 +5812,13 @@ do_catchsql_test 35.1 {
INSERT INTO f(f) VALUES ('integrity-check');
} {1 {database disk image is malformed}}
reset_db
do_catchsql_test 36.0 {
CREATE VIRTUAL TABLE f USING fts3(a,tokenize=porter);
CREATE TABLE 'f_stat'(id INTEGER PRIMARY KEY, value BLOB);
INSERT INTO f VALUES (1);
INSERT INTO f_stat VALUES (1,x'00000000000101010119013d00ffff0400fa83717b71a69297979701f63d010101010101010101010101190000000000000000fa83717b71a601f63d01010101010101010101010119013d00ffffff0400fa83717b71a69297979701f63d010101010101010101010101190000000000000000fa83717b71a69201f63d010101f63d01010101010101010101010119013d00ffffff0400fa83717b71a6929797010101010101010101010119013d00ffff01f63d01010101010101010101010119013d00ffffff0400fa83717b71a69297979701f63d00fa03ffffffa69297979701f63d010101000000000101010101197e9797976567656565ffa63535354e');
INSERT INTO f(f) VALUES ('merge=53,216');
} {0 {}}
finish_test