Browse Source

[Minor] Do not send shingles request if no shingles were produced

tags/2.6
Vsevolod Stakhov 3 years ago
parent
commit
fe8bd94298
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/plugins/fuzzy_check.c

+ 4
- 0
src/plugins/fuzzy_check.c View 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));

Loading…
Cancel
Save