From: Dmitry Volyntsev Date: Fri, 1 Sep 2017 15:51:17 +0000 (+0300) Subject: Fixed passing uninitialized value to printf(). X-Git-Tag: 0.1.14~11 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=e72a08f5b1da8a155a6e0f72dcbf0947d5964399;p=njs.git Fixed passing uninitialized value to printf(). Previously, njs_ext_console_log() passed an uninitialized value to printf() function in the case of an error. The precison argument was set to 0 in such a case, so well-behaved implementation was able to handle it properly. Setting this value to NULL, just to make sure and to make Coverity Scan happy. --- diff --git a/njs/njs.c b/njs/njs.c index f1a404a5..d82c994c 100644 --- a/njs/njs.c +++ b/njs/njs.c @@ -598,6 +598,7 @@ njs_ext_console_log(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, nxt_str_t msg; msg.length = 0; + msg.start = NULL; if (nargs >= 2 && njs_value_to_ext_string(vm, &msg, njs_argument(args, 1))