From 55b12f864137e11e5a5d6c79646d2d99f8eee8a4 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 10 Jun 2003 04:11:42 +0000 Subject: [PATCH] The output from AES_cbc_encrypt() should be exact multiple blocks when encrypting --- crypto/aes/aes_cbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.25.1