Fix another corruption related crash in fts5.

FossilOrigin-Name: 4538d9afe4e6360e20c7b474e77314e5ad293453e1edbe356bf6ea84c05857ee
This commit is contained in:
dan
2019-01-17 20:06:56 +00:00
parent aa0f2d0efa
commit 934d4f7bac
4 changed files with 230 additions and 10 deletions
+1 -1
View File
@@ -1652,7 +1652,7 @@ static void fts5SegIterLoadTerm(Fts5Index *p, Fts5SegIter *pIter, int nKeep){
int nNew; /* Bytes of new data */
iOff += fts5GetVarint32(&a[iOff], nNew);
if( iOff+nNew>pIter->pLeaf->nn || nKeep>pIter->term.n ){
if( iOff+nNew>pIter->pLeaf->szLeaf || nKeep>pIter->term.n ){
p->rc = FTS5_CORRUPT;
return;
}