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

Fix a segfault that can occur in matchinfo if an fts4 table contains mostly zero-length documents. Specifically, if the table contains more rows than it does bytes of text.

FossilOrigin-Name: fe9047668eaaf76e7aa1ef1f32dec7c7c4226e45
This commit is contained in:
dan
2011-01-13 10:58:26 +00:00
parent efd95a7aca
commit 86596e552e
8 changed files with 43 additions and 25 deletions

View File

@ -956,6 +956,7 @@ static int fts3MatchinfoSelectDoctotal(
if( rc!=SQLITE_OK ) return rc;
}
pStmt = *ppStmt;
assert( sqlite3_data_count(pStmt)==1 );
a = sqlite3_column_blob(pStmt, 0);
a += sqlite3Fts3GetVarint(a, &nDoc);