mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Ensure that the sqlite3_index_info.idxStr string coming back from FTS5
is always zero-terminated, even if the xBestIndex call fails with an SQLITE_CONSTRAINT error. FossilOrigin-Name: a4e976a030851357049e672bbc0ff66d9cc152b3d5f8e03fff36a7c6f060a755
This commit is contained in:
@ -632,6 +632,7 @@ static int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
|
||||
if( p->usable==0 || iCol<0 ){
|
||||
/* As there exists an unusable MATCH constraint this is an
|
||||
** unusable plan. Return SQLITE_CONSTRAINT. */
|
||||
idxStr[iIdxStr] = 0;
|
||||
return SQLITE_CONSTRAINT;
|
||||
}else{
|
||||
if( iCol==nCol+1 ){
|
||||
|
Reference in New Issue
Block a user