aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-18 18:31:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-18 18:31:46 +0100
commit31138dd8acc790c0129fb488584311c85c96f87c (patch)
tree14e5638d60375dfe27caf72ec7711eb99e0b9663 /src
parent88fb22db06f44363acf3b61f2635473f7102a0f3 (diff)
downloadrspamd-31138dd8acc790c0129fb488584311c85c96f87c.tar.gz
rspamd-31138dd8acc790c0129fb488584311c85c96f87c.zip
[Fix] Neural: Add protection agains infinities
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 5be5b3f94..263aa83fa 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -4667,7 +4667,7 @@ lua_task_process_ann_tokens (lua_State *L)
sres = rspamd_task_find_symbol_result (task, sym);
if (sres && !(sres->flags & RSPAMD_SYMBOL_RESULT_IGNORED)) {
- if (!isnan (sres->score) &&
+ if (!isnan (sres->score) && !isinf (sres->score) &&
!(rspamd_symcache_item_flags (sres->sym->cache_item) &
SYMBOL_TYPE_NOSTAT)) {