e_aes_cbc_hmac_sha1.c: fine-tune cache line alignment.
authorAndy Polyakov <appro@openssl.org>
Fri, 8 Feb 2013 08:43:01 +0000 (09:43 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 8 Feb 2013 08:45:09 +0000 (09:45 +0100)
With previous commit it also ensures that valgrind is happy.

crypto/evp/e_aes_cbc_hmac_sha1.c

index 6a2628cf1ab1960c5e8d2b53eb5e3049e43a9021..483e04b605b79aab6c521dcaa93500e4a39a67b4 100644 (file)
@@ -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,