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

Fix a segfault that can occur following an OOM in the FTS3 snippet() function

FossilOrigin-Name: c7e5966e3b031672f149d0b6e1f75f9bc40868fa
This commit is contained in:
dan
2010-01-06 18:36:27 +00:00
parent b023b04fcb
commit c06013dca7
3 changed files with 10 additions and 7 deletions

View File

@ -450,6 +450,9 @@ int fts3SnippetShift(
pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule;
rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC);
if( rc!=SQLITE_OK ){
return rc;
}
pC->pTokenizer = pTab->pTokenizer;
while( rc==SQLITE_OK && iCurrent<(nSnippet+nDesired) ){
const char *ZDUMMY; int DUMMY1, DUMMY2, DUMMY3;