diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-07-11 16:23:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-07-11 16:23:33 +0100 |
commit | ea14905c994fa7e0df53f8f6989e8c65c37606d5 (patch) | |
tree | 2a3391253efc9f8cc03e64c2e7a2b93731ecd02c /src/lua | |
parent | 3cb946c77d0c06750ccb3a4cbb709244dfd69344 (diff) | |
download | rspamd-ea14905c994fa7e0df53f8f6989e8c65c37606d5.tar.gz rspamd-ea14905c994fa7e0df53f8f6989e8c65c37606d5.zip |
[Fix] Do not crash if symbol is missing in the metric
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_task.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |