From: Dmitry Volyntsev Date: Fri, 2 Sep 2022 00:49:06 +0000 (-0700) Subject: Added error handling for NJS_VMCODE_FUNCTION_COPY instruction. X-Git-Tag: 0.7.8~37 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=7ed499b6ef96f7abb13f68bf71fd203381cc7d5a;p=njs.git Added error handling for NJS_VMCODE_FUNCTION_COPY instruction. This closes #572 issue on Github. --- diff --git a/src/njs_vmcode.c b/src/njs_vmcode.c index 84b8b923..ce071db1 100644 --- a/src/njs_vmcode.c +++ b/src/njs_vmcode.c @@ -742,6 +742,10 @@ next: fcopy = (njs_vmcode_function_copy_t *) pc; ret = njs_vmcode_function_copy(vm, fcopy->function, fcopy->retval); + if (njs_slow_path(ret != NJS_OK)) { + goto error; + } + break; case NJS_VMCODE_FUNCTION_FRAME: