diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/filter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c index 5bbdd87e7..13b48cfda 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -110,6 +110,12 @@ insert_metric_result (struct rspamd_task *task, metric_res = rspamd_create_metric_result (task); + if (!isfinite (flag)) { + msg_warn_task ("detected %s score for symbol %s, replace it with zero", + isnan (flag) ? "NaN" : "infinity", symbol); + flag = 0.0; + } + sdef = g_hash_table_lookup (metric->symbols, symbol); if (sdef == NULL) { w = 0.0; |