From 6f3f310f64c10598d8d911b2e1115909bc1b1d57 Mon Sep 17 00:00:00 2001 From: Alexander Borisov Date: Mon, 1 Nov 2021 18:32:48 +0300 Subject: [PATCH] Fixed heap-use-after-free in await frame. The bug was introduced in 92d10cd761e2 (0.7.0). --- src/njs_async.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/njs_async.c b/src/njs_async.c index b5f6c3a6..6a93cfd0 100644 --- a/src/njs_async.c +++ b/src/njs_async.c @@ -72,6 +72,8 @@ njs_await_fulfilled(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, } async = ctx->await; + async->previous = vm->top_frame; + function = async->function; cur_local = vm->levels[NJS_LEVEL_LOCAL]; -- 2.47.3