From: Vsevolod Stakhov Date: Mon, 28 Sep 2020 11:22:49 +0000 (+0100) Subject: [Minor] Do not send shingles request if no shingles were produced X-Git-Tag: 2.6~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fe8bd9429838d01e50c763c47bc63433d64d44da;p=rspamd.git [Minor] Do not send shingles request if no shingles were produced --- 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));