From: Andy Polyakov Date: Fri, 8 Feb 2013 08:43:01 +0000 (+0100) Subject: e_aes_cbc_hmac_sha1.c: fine-tune cache line alignment. X-Git-Tag: OpenSSL_1_0_1e~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13e225300ff819754a2192229d8bbd329795d793;p=openssl e_aes_cbc_hmac_sha1.c: fine-tune cache line alignment. With previous commit it also ensures that valgrind is happy. --- 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,