aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-25 20:02:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-25 20:33:55 +0000
commitae24d391fb899234fefa49fa6a557e7c77a96522 (patch)
tree4300fc8c226a5eec603a8562023cf3e5ff13daee /src
parent3f578a1e9c7c087f6dbdefb42d6ca80f76fb0123 (diff)
downloadrspamd-ae24d391fb899234fefa49fa6a557e7c77a96522.tar.gz
rspamd-ae24d391fb899234fefa49fa6a557e7c77a96522.zip
[Minor] Fix division by zero
Diffstat (limited to 'src')
-rw-r--r--src/plugins/chartable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c
index c997862a1..56fdac3a6 100644
--- a/src/plugins/chartable.c
+++ b/src/plugins/chartable.c
@@ -596,7 +596,7 @@ rspamd_chartable_process_part (struct rspamd_task *task,
gdouble cur_score = 0.0;
if (part == NULL || part->utf_words == NULL ||
- part->utf_words->len == 0) {
+ part->utf_words->len == 0 || part->nwords == 0) {
return FALSE;
}