]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix issue when there is no reject score for any metric.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Sep 2015 15:34:09 +0000 (16:34 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 22 Sep 2015 15:34:09 +0000 (16:34 +0100)
src/libserver/symbols_cache.c

index b21caab8a3e6345fd9eca8164b80136714c24040..52b62fac5c030c9e364ee82208ee31e7cb4ca8fa 100644 (file)
@@ -863,10 +863,15 @@ rspamd_symbols_cache_metric_limit (struct rspamd_task *task,
                }
        }
 
-       g_assert (cp->rs != NULL);
+       if (cp->rs) {
 
-       if (cp->rs->score > cp->lim) {
-               return TRUE;
+               if (cp->rs->score > cp->lim) {
+                       return TRUE;
+               }
+       }
+       else {
+               /* No reject score define, always check all rules */
+               cp->lim = -1;
        }
 
        return FALSE;