1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Avoid a NULL pointer dereference following an OOM while generating code

for IN operators on virtual tables.

FossilOrigin-Name: c924008692e35f1f5144830af08d6de051dd21dd
This commit is contained in:
drh
2016-03-07 19:08:27 +00:00
parent 8c71a98ce1
commit 237b2b7111
3 changed files with 11 additions and 9 deletions

View File

@@ -932,8 +932,10 @@ Bitmask sqlite3WhereCodeOneLoopStart(
if( pCompare ){
pCompare->pLeft = pTerm->pExpr->pLeft;
pCompare->pRight = pRight = sqlite3Expr(db, TK_REGISTER, 0);
if( pRight ) pRight->iTable = iReg+j+2;
sqlite3ExprIfFalse(pParse, pCompare, pLevel->addrCont, 0);
if( pRight ){
pRight->iTable = iReg+j+2;
sqlite3ExprIfFalse(pParse, pCompare, pLevel->addrCont, 0);
}
pCompare->pLeft = 0;
sqlite3ExprDelete(db, pCompare);
}