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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user