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) {
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);
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) {
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);