]> source.dussan.org Git - rspamd.git/commitdiff
Fix fuzzy storage constants
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 10:49:26 +0000 (11:49 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 10:49:26 +0000 (11:49 +0100)
src/fuzzy_storage.c
src/fuzzy_storage.h

index 4d4171e9958e374a369fa7f971d205aa92603718..09fc0fcf6e75a6a7bb8ebfacd97d0e34d1cbbfe1 100644 (file)
@@ -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
index 51f6a14f4eb8e551a30b7b8621c5689294cb39d5..e2e959087a8de50d1d3c294357206bb61ae61d8a 100644 (file)
@@ -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) {