From 16ce35fa199d23a4c1c6b5dfe5d697b9efb7c2f1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 19 Oct 2015 11:49:26 +0100 Subject: [PATCH] Fix fuzzy storage constants --- src/fuzzy_storage.c | 2 +- src/fuzzy_storage.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 4d4171e99..09fc0fcf6 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -105,7 +105,7 @@ struct fuzzy_session { guint64 time; rspamd_inet_addr_t *addr; struct rspamd_fuzzy_storage_ctx *ctx; - guchar nm[rspamd_cryptobox_NMBYTES]; + guchar nm[rspamd_cryptobox_MAX_NMBYTES]; }; static gboolean diff --git a/src/fuzzy_storage.h b/src/fuzzy_storage.h index 51f6a14f4..e2e959087 100644 --- a/src/fuzzy_storage.h +++ b/src/fuzzy_storage.h @@ -38,9 +38,9 @@ RSPAMD_PACKED(rspamd_fuzzy_reply) { RSPAMD_PACKED(rspamd_fuzzy_encrypted_req_hdr) { guchar magic[4]; guchar reserved[8]; - guchar pubkey[rspamd_cryptobox_PKBYTES]; - guchar nonce[rspamd_cryptobox_NONCEBYTES]; - guchar mac[rspamd_cryptobox_MACBYTES]; + guchar pubkey[32]; + guchar nonce[rspamd_cryptobox_MAX_NONCEBYTES]; + guchar mac[rspamd_cryptobox_MAX_MACBYTES]; }; RSPAMD_PACKED(rspamd_fuzzy_encrypted_cmd) { @@ -54,8 +54,8 @@ RSPAMD_PACKED(rspamd_fuzzy_encrypted_shingle_cmd) { }; RSPAMD_PACKED(rspamd_fuzzy_encrypted_rep_hdr) { - guchar nonce[rspamd_cryptobox_NONCEBYTES]; - guchar mac[rspamd_cryptobox_MACBYTES]; + guchar nonce[rspamd_cryptobox_MAX_NONCEBYTES]; + guchar mac[rspamd_cryptobox_MAX_MACBYTES]; }; RSPAMD_PACKED(rspamd_fuzzy_encrypted_reply) { -- 2.39.5