diff options
-rw-r--r-- | src/fuzzy_storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 8d02732fa..ca28ebe79 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -587,7 +587,7 @@ rspamd_fuzzy_decrypt_command (struct fuzzy_session *s) s->key_stat = key->stat; /* Now process keypair */ - memcpy (rk.pk, hdr->pubkey, sizeof (rk.pk)); + memcpy (rk.pk, hdr->pubkey, MIN(sizeof (hdr->pubkey), sizeof (rk.pk))); rspamd_keypair_cache_process (s->ctx->keypair_cache, key->key, &rk); /* Now decrypt request */ |