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

Check that malloc() has not already failed when invoking the xUpdate() method

of a virtual table implementation. This fixes an assert() failure in FTS5 that
could occur following an OOM condition.

FossilOrigin-Name: e9a7e4d58f3716991309ca0e3f080717e473c7c231685954aceee36172f19cf2
This commit is contained in:
dan
2018-06-13 11:11:13 +00:00
parent ea74c1db64
commit 466ea9b1e2
4 changed files with 11 additions and 9 deletions

View File

@@ -6999,6 +6999,7 @@ case OP_VUpdate: {
|| pOp->p5==OE_Abort || pOp->p5==OE_Ignore || pOp->p5==OE_Replace
);
assert( p->readOnly==0 );
if( db->mallocFailed ) goto no_mem;
sqlite3VdbeIncrWriteCounter(p, 0);
pVtab = pOp->p4.pVtab->pVtab;
if( pVtab==0 || NEVER(pVtab->pModule==0) ){