From: Vsevolod Stakhov Date: Mon, 11 Jul 2016 15:02:41 +0000 (+0100) Subject: [Fix] Add guards for empty parts X-Git-Tag: 1.3.0~117 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=63cf15b031c810513f1c852f04ceb2767677f950;p=rspamd.git [Fix] Add guards for empty parts --- diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c index 14780509a..2b22fd6c7 100644 --- a/src/plugins/chartable.c +++ b/src/plugins/chartable.c @@ -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; }