From 13e225300ff819754a2192229d8bbd329795d793 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 8 Feb 2013 09:43:01 +0100 Subject: [PATCH] e_aes_cbc_hmac_sha1.c: fine-tune cache line alignment. With previous commit it also ensures that valgrind is happy. --- crypto/evp/e_aes_cbc_hmac_sha1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index 6a2628cf1a..483e04b605 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -247,7 +247,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char c[32+SHA_DIGEST_LENGTH]; } mac, *pmac; /* arrange cache line alignment */ - pmac = (void *)(((size_t)mac.c+32)&((size_t)0-32)); + pmac = (void *)(((size_t)mac.c+31)&((size_t)0-32)); /* decrypt HMAC|padding at once */ aesni_cbc_encrypt(in,out,len, -- 2.25.1