From: Dmitry Volyntsev Date: Fri, 22 May 2026 00:23:09 +0000 (-0700) Subject: Modules: fixed QuickJS log argument conversion X-Git-Tag: 1.0.0~51 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/stylesheets/print.css?a=commitdiff_plain;h=37efcad453f602168c0ccbf526fc84a319b0985f;p=njs.git Modules: fixed QuickJS log argument conversion --- diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 530bea32..2412bbc0 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -6475,6 +6475,9 @@ ngx_http_qjs_ext_log(JSContext *cx, JSValueConst this_val, int argc, for (n = 0; n < argc; n++) { msg = JS_ToCString(cx, argv[n]); + if (msg == NULL) { + return JS_EXCEPTION; + } ngx_js_logger(r->connection, level, (u_char *) msg, ngx_strlen(msg)); diff --git a/nginx/ngx_stream_js_module.c b/nginx/ngx_stream_js_module.c index 5e550c57..096b96cb 100644 --- a/nginx/ngx_stream_js_module.c +++ b/nginx/ngx_stream_js_module.c @@ -2181,6 +2181,9 @@ ngx_stream_qjs_ext_log(JSContext *cx, JSValueConst this_val, int argc, for (n = 0; n < argc; n++) { msg = JS_ToCString(cx, argv[n]); + if (msg == NULL) { + return JS_EXCEPTION; + } ngx_js_logger(s->connection, level, (u_char *) msg, ngx_strlen(msg));