]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Add guards for empty parts
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Jul 2016 15:02:41 +0000 (16:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Jul 2016 15:02:56 +0000 (16:02 +0100)
src/plugins/chartable.c

index 14780509a165aa44b8fa9bef36d68d97f6c6d044..2b22fd6c7f62722d19c921ac7b8e7ba56aa90d4f 100644 (file)
@@ -336,7 +336,8 @@ rspamd_chartable_process_part (struct rspamd_task *task,
        guint i;
        gdouble cur_score = 0.0;
 
-       if (part->normalized_words->len == 0) {
+       if (part == NULL || part->normalized_words == NULL ||
+                       part->normalized_words->len == 0) {
                return;
        }