aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fuzzy_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r--src/plugins/fuzzy_check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 0030b2cbc..ef5eb1c22 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -1091,7 +1091,7 @@ fuzzy_cmd_from_data_part (struct fuzzy_rule *rule,
gsize datalen)
{
struct rspamd_fuzzy_cmd *cmd;
- struct rspamd_fuzzy_encrypted_cmd *enccmd;
+ struct rspamd_fuzzy_encrypted_cmd *enccmd = NULL;
struct fuzzy_cmd_io *io;
rspamd_cryptobox_hash_state_t st;
@@ -1121,6 +1121,7 @@ fuzzy_cmd_from_data_part (struct fuzzy_rule *rule,
io->tag = cmd->tag;
if (rule->peer_key) {
+ g_assert (enccmd != NULL);
fuzzy_encrypt_cmd (rule, &enccmd->hdr, (guchar *) cmd, sizeof (*cmd));
io->io.iov_base = enccmd;
io->io.iov_len = sizeof (*enccmd);