From: Vsevolod Stakhov Date: Thu, 11 Jul 2024 15:23:33 +0000 (+0100) Subject: [Fix] Do not crash if symbol is missing in the metric X-Git-Tag: 3.9.0~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea14905c994fa7e0df53f8f6989e8c65c37606d5;p=rspamd.git [Fix] Do not crash if symbol is missing in the metric --- diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 61aac63f2..21e24fc45 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4716,7 +4716,7 @@ lua_push_symbol_result(lua_State *L, lua_settable(L, -3); /* Dynamic weight of the symbol */ - if (s->sym->score != 0) { + if (s->sym != NULL && s->sym->score != 0) { lua_pushstring(L, "weight"); lua_pushnumber(L, s->score / s->sym->score); }