summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/ext/fts3/fts3.c
diff options
context:
space:
mode:
authorjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
committerjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
commit476ed7b902c71c189883939f8fb66a03e3eb82d9 (patch)
treeac10f46a6d4287dd3790a3815808837f9318d24b /lib/libsqlite3/ext/fts3/fts3.c
parentfrom zhuk: two grammar fixes; (diff)
downloadwireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.tar.xz
wireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.zip
Update sqlite3 to 3.8.7.4. Changes available here: http://sqlite.org/changes.html#version_3_8_7_4
ok landry@
Diffstat (limited to 'lib/libsqlite3/ext/fts3/fts3.c')
-rw-r--r--lib/libsqlite3/ext/fts3/fts3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libsqlite3/ext/fts3/fts3.c b/lib/libsqlite3/ext/fts3/fts3.c
index 4f4b6674309..2b93c627157 100644
--- a/lib/libsqlite3/ext/fts3/fts3.c
+++ b/lib/libsqlite3/ext/fts3/fts3.c
@@ -3116,6 +3116,7 @@ static int fts3FilterMethod(
/* In case the cursor has been used before, clear it now. */
sqlite3_finalize(pCsr->pStmt);
sqlite3_free(pCsr->aDoclist);
+ sqlite3_free(pCsr->aMatchinfo);
sqlite3Fts3ExprFree(pCsr->pExpr);
memset(&pCursor[1], 0, sizeof(Fts3Cursor)-sizeof(sqlite3_vtab_cursor));
@@ -4426,7 +4427,7 @@ static int fts3EvalIncrPhraseNext(
bMaxSet = 1;
}
}
- assert( rc!=SQLITE_OK || a[p->nToken-1].bIgnore==0 );
+ assert( rc!=SQLITE_OK || (p->nToken>=1 && a[p->nToken-1].bIgnore==0) );
assert( rc!=SQLITE_OK || bMaxSet );
/* Keep advancing iterators until they all point to the same document */