mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix another test problem and some instances where an OOM may cause a segfault.
FossilOrigin-Name: 31199db0f77cf4b32d5589a29abd9535b155164b
This commit is contained in:
@@ -843,7 +843,9 @@ static CodedTrigger *codeRowTrigger(
|
||||
/* Code the WHEN clause. If it evaluates to false (or NULL) the
|
||||
** sub-vdbe is immediately halted. */
|
||||
pWhen = sqlite3ExprDup(db, pTrigger->pWhen, 0);
|
||||
if( SQLITE_OK==sqlite3ResolveExprNames(&sNC, pWhen) ){
|
||||
if( SQLITE_OK==sqlite3ResolveExprNames(&sNC, pWhen)
|
||||
&& db->mallocFailed==0
|
||||
){
|
||||
iEndTrigger = sqlite3VdbeMakeLabel(v);
|
||||
sqlite3ExprIfFalse(pSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL);
|
||||
}
|
||||
@@ -859,7 +861,9 @@ static CodedTrigger *codeRowTrigger(
|
||||
VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
|
||||
|
||||
transferParseError(pParse, pSubParse);
|
||||
pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pParse->nArg);
|
||||
if( db->mallocFailed==0 ){
|
||||
pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pParse->nArg);
|
||||
}
|
||||
pProgram->nMem = pSubParse->nMem;
|
||||
pProgram->nCsr = pSubParse->nTab;
|
||||
pProgram->token = (void *)pTrigger;
|
||||
|
Reference in New Issue
Block a user