]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not send shingles request if no shingles were produced
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 28 Sep 2020 11:22:49 +0000 (12:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 28 Sep 2020 11:22:49 +0000 (12:22 +0100)
src/plugins/fuzzy_check.c

index 810abf5874da65cf27b53557154cb0b399f7c504..4e1a2263abce35c7082c3547a03c062d0dee3089 100644 (file)
@@ -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));