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

Ensure that the idxStr for FTS5 is always zero-terminated.

Fix for check-in [e6db945454a0dae2]

FossilOrigin-Name: 090cd07d37904da4610d6a6787a3cc825c9a8bdcc5f051267d4608bba9b49d03
This commit is contained in:
drh
2019-09-13 13:23:13 +00:00
parent fbb9a5b1e3
commit 3f3f2c7357
3 changed files with 9 additions and 7 deletions

View File

@ -567,6 +567,8 @@ static int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
/* As there exists an unusable MATCH constraint this is an
** unusable plan. Set a prohibitively high cost. */
pInfo->estimatedCost = 1e50;
assert( iIdxStr < pInfo->nConstraint*6 + 1 );
idxStr[iIdxStr] = 0;
return SQLITE_OK;
}else{
if( iCol==nCol+1 ){