summaryrefslogtreecommitdiffstats
path: root/src/plugins/fuzzy_check.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-28 12:22:49 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-28 12:22:49 +0100
commitfe8bd9429838d01e50c763c47bc63433d64d44da (patch)
tree96d336b67168560b5e4862b5cac08016cefe3a7a /src/plugins/fuzzy_check.c
parentf19c68f2b12fcde531d914b6540b3e37dc61fcf0 (diff)
downloadrspamd-fe8bd9429838d01e50c763c47bc63433d64d44da.tar.gz
rspamd-fe8bd9429838d01e50c763c47bc63433d64d44da.zip
[Minor] Do not send shingles request if no shingles were produced
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r--src/plugins/fuzzy_check.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 810abf587..4e1a2263a 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -1731,6 +1731,10 @@ fuzzy_cmd_from_text_part (struct rspamd_task *task,
memcpy (&shcmd->sgl, sh, sizeof (shcmd->sgl));
shcmd->basic.shingles_count = RSPAMD_SHINGLE_SIZE;
}
+ else {
+ /* No shingles, no check */
+ return NULL;
+ }
cached->sh = sh;
memcpy (cached->digest, shcmd->basic.digest, sizeof (cached->digest));