1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a memory leak in fts5 that could occur if scalar function fts5_decode()

was passed a corrupt record.

FossilOrigin-Name: 240f1c0c92cad8a1c19438b38489aedb831f62a4603c53f22367e876d8f644ff
This commit is contained in:
dan
2019-01-10 19:26:52 +00:00
parent f7d687c9d3
commit 6ca98ad6b1
4 changed files with 182 additions and 10 deletions

View File

@ -6422,14 +6422,14 @@ static void fts5DecodeFunction(
}
if( iEnd>szLeaf ){
rc = FTS5_CORRUPT;
goto decode_out;
break;
}
if( bFirst==0 ){
iOff += fts5GetVarint32(&a[iOff], nByte);
if( nByte>term.n ){
rc = FTS5_CORRUPT;
goto decode_out;
break;
}
term.n = nByte;
}