]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add workaround for learn condition when no symbols defined
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 19 Mar 2017 11:08:09 +0000 (11:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 19 Mar 2017 11:08:09 +0000 (11:08 +0000)
Issue: #1536

src/libstat/stat_process.c

index a1269664d88242a7f41e2e37cd7f3e1f754b8f50..8d9717562285d3f9cec1cb3d6376f3da2be3a53e 100644 (file)
@@ -958,6 +958,10 @@ rspamd_stat_has_classifier_symbols (struct rspamd_task *task,
        struct rspamd_stat_ctx *st_ctx;
        gboolean is_spam;
 
+       if (mres == NULL) {
+               return FALSE;
+       }
+
        st_ctx = rspamd_stat_get_ctx ();
        is_spam = !!(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM);