From cb8a8936aadd0b80857f302b870bb8dd08039049 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 18 Feb 2021 12:24:01 +0200 Subject: [PATCH] lua/api: ensure the function name in the debug output is non-null NULL crashes the journald writer --- modules/module-lua-scripting/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/module-lua-scripting/api.c b/modules/module-lua-scripting/api.c index 5e90df49..55e4dfc0 100644 --- a/modules/module-lua-scripting/api.c +++ b/modules/module-lua-scripting/api.c @@ -183,6 +183,7 @@ log_log (lua_State *L, GLogLevelFlags lvl) message = luaL_checkstring (L, index); sprintf (line_str, "%d", ar.currentline); + ar.name = ar.name ? ar.name : "chunk"; wp_log_structured_standard (G_LOG_DOMAIN, lvl, ar.source, line_str, ar.name, type, instance, "%s", message); -- GitLab