summaryrefslogtreecommitdiffstats
path: root/src/plugins/chartable.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-11 16:02:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-11 16:02:56 +0100
commit63cf15b031c810513f1c852f04ceb2767677f950 (patch)
tree96c327e9516993acee70901ef457d0ac3a293e3c /src/plugins/chartable.c
parent62f8bc19d095ae8e63882a0ee6811c55def176e8 (diff)
downloadrspamd-63cf15b031c810513f1c852f04ceb2767677f950.tar.gz
rspamd-63cf15b031c810513f1c852f04ceb2767677f950.zip
[Fix] Add guards for empty parts
Diffstat (limited to 'src/plugins/chartable.c')
-rw-r--r--src/plugins/chartable.c3
1 files changed, 2 insertions, 1 deletions
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;
}