1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Fix a buffer overread that could in fts3 when dealing with corrupt records.

FossilOrigin-Name: 1660d7733eb443ab085ddef7666b998a1c75ac81cc54a9620960a8d3b377e28e
This commit is contained in:
dan
2019-05-22 14:22:44 +00:00
parent 51e441da2b
commit 29fa6b6642
5 changed files with 285 additions and 13 deletions

View File

@ -2619,14 +2619,14 @@ static void fts3ColumnFilter(
nList -= (int)(p - pList);
pList = p;
if( nList==0 ){
if( nList<=0 ){
break;
}
p = &pList[1];
p += fts3GetVarint32(p, &iCurrent);
}
if( bZero && &pList[nList]!=pEnd ){
if( bZero && (pEnd - &pList[nList])>0){
memset(&pList[nList], 0, pEnd - &pList[nList]);
}
*ppList = pList;