From: Richard Levitte Date: Tue, 10 Jun 2003 04:11:42 +0000 (+0000) Subject: The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting X-Git-Tag: BEN_FIPS_TEST_1~38^2~70 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=55b12f864137e11e5a5d6c79646d2d99f8eee8a4;p=oweals%2Fopenssl.git The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting --- diff --git a/crypto/aes/aes_cbc.c b/crypto/aes/aes_cbc.c index 01e965a532..86b27b10d6 100644 --- a/crypto/aes/aes_cbc.c +++ b/crypto/aes/aes_cbc.c @@ -86,7 +86,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, for(n=len; n < AES_BLOCK_SIZE; ++n) tmp[n] = ivec[n]; AES_encrypt(tmp, tmp, key); - memcpy(out, tmp, len); + memcpy(out, tmp, AES_BLOCK_SIZE); memcpy(ivec, tmp, AES_BLOCK_SIZE); } } else {