diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fuzzy_check.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 317bb7dd4..bc8f326a7 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1130,7 +1130,7 @@ fuzzy_cmd_stat (struct fuzzy_rule *rule, rspamd_mempool_t *pool) { struct rspamd_fuzzy_cmd *cmd; - struct rspamd_fuzzy_encrypted_cmd *enccmd; + struct rspamd_fuzzy_encrypted_cmd *enccmd = NULL; struct fuzzy_cmd_io *io; if (rule->peer_key) { @@ -1151,7 +1151,7 @@ fuzzy_cmd_stat (struct fuzzy_rule *rule, io->tag = cmd->tag; memcpy (&io->cmd, cmd, sizeof (io->cmd)); - if (rule->peer_key) { + if (rule->peer_key && enccmd) { fuzzy_encrypt_cmd (rule, &enccmd->hdr, (guchar *)cmd, sizeof (*cmd)); io->io.iov_base = enccmd; io->io.iov_len = sizeof (*enccmd); @@ -1173,7 +1173,7 @@ fuzzy_cmd_hash (struct fuzzy_rule *rule, rspamd_mempool_t *pool) { struct rspamd_fuzzy_cmd *cmd; - struct rspamd_fuzzy_encrypted_cmd *enccmd; + struct rspamd_fuzzy_encrypted_cmd *enccmd = NULL; struct fuzzy_cmd_io *io; if (rule->peer_key) { @@ -1208,7 +1208,7 @@ fuzzy_cmd_hash (struct fuzzy_rule *rule, memcpy (&io->cmd, cmd, sizeof (io->cmd)); - if (rule->peer_key) { + if (rule->peer_key && enccmd) { fuzzy_encrypt_cmd (rule, &enccmd->hdr, (guchar *)cmd, sizeof (*cmd)); io->io.iov_base = enccmd; io->io.iov_len = sizeof (*enccmd); |