aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-11-01 16:37:53 +0000
committerdrh <drh@noemail.net>2019-11-01 16:37:53 +0000
commitf2b9d7c60502581bfd2908fbdb0dd00017d26cb0 (patch)
tree67035b26a2905827325dbdd99fb4813435669597 /src
parentdc2e331ab2b469a6b950a5456b830ade8238e9a8 (diff)
downloadsqlite-f2b9d7c60502581bfd2908fbdb0dd00017d26cb0.tar.gz
sqlite-f2b9d7c60502581bfd2908fbdb0dd00017d26cb0.zip
Fix a potential use-after-free bug that follows an OOM error in code
added two days ago by check-in [84e02d773d60cffe]. Problem discovered by OSSFuzz. FossilOrigin-Name: 0a2eb949f8a759e5745d9468c8183d3c0b4b30e0fa2a14b3062620eb9e1d5c1d
Diffstat (limited to 'src')
-rw-r--r--src/vdbeaux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 9596e163b..21b396b36 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -368,10 +368,10 @@ int sqlite3VdbeAddFunctionCall(
pCtx->pVdbe = 0;
pCtx->isError = 0;
pCtx->argc = nArg;
+ pCtx->iOp = sqlite3VdbeCurrentAddr(v);
addr = sqlite3VdbeAddOp4(v, eCallCtx ? OP_PureFunc : OP_Function,
p1, p2, p3, (char*)pCtx, P4_FUNCCTX);
sqlite3VdbeChangeP5(v, eCallCtx & NC_SelfRef);
- pCtx->iOp = addr;
return addr;
}