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

Avoid deferencing a freed pointer following an OOM or SQLITE_CORRUPT error in

the fts3 xDestroy method.

FossilOrigin-Name: 505ed9a47825240979338a24044559613fbbd2a7850bdff70c7164da054ec63d
This commit is contained in:
dan
2019-01-21 17:57:31 +00:00
parent ac30553f76
commit 129371553c
4 changed files with 36 additions and 15 deletions

View File

@ -240,4 +240,20 @@ do_faultsim_test 10.1 -prep {
faultsim_test_result {0 {}}
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 11.0 {
CREATE VIRTUAL TABLE t1 USING fts3(a, b);
}
faultsim_save_and_close
do_faultsim_test 11 -faults oom* -prep {
faultsim_restore_and_reopen
} -body {
execsql { DROP TABLE t1 }
} -test {
faultsim_test_result {0 {}}
}
finish_test