From: Dmitry Volyntsev Date: Tue, 28 Aug 2018 12:37:14 +0000 (+0300) Subject: Fixed out-of-bounds read. X-Git-Tag: 0.2.4~17 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=155ee346809a2be821ce625e047b5b0fedccf02a;p=njs.git Fixed out-of-bounds read. Found by Coverity (CID 1438786). --- diff --git a/njs/njs_function.c b/njs/njs_function.c index 7aa5773e..4227f24d 100644 --- a/njs/njs_function.c +++ b/njs/njs_function.c @@ -517,7 +517,7 @@ njs_function_prototype_length(njs_vm_t *vm, njs_value_t *value, function = value->data.u.function; if (function->native) { - for (n = function->args_offset; n <= NJS_ARGS_TYPES_MAX; n++) { + for (n = function->args_offset; n < NJS_ARGS_TYPES_MAX; n++) { if (function->args_types[n] == 0) { break; }