Skip to content

Commit f524f0e

Browse files
committed
Fix a buffer overrun that could occur in fts5 when running a prefix query against a corrupt db.
1 parent 1776b5e commit f524f0e

File tree

3 files changed

+3833
-1
lines changed

3 files changed

+3833
-1
lines changed

ext/fts5/fts5_index.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4822,6 +4822,9 @@ static void fts5DoclistIterNext(Fts5DoclistIter *pIter){
48224822
}
48234823

48244824
pIter->aPoslist = p;
4825+
if( &pIter->aPoslist[pIter->nPoslist]>pIter->aEof ){
4826+
pIter->aPoslist = 0;
4827+
}
48254828
}
48264829
}
48274830

0 commit comments

Comments
 (0)