From 84468b291bb7c258b40870dd999f75cbff00aa50 Mon Sep 17 00:00:00 2001 From: kokke Date: Fri, 10 Nov 2017 20:19:02 +0100 Subject: [PATCH] Update aes.c --- aes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aes.c b/aes.c index 00575dc..0ff8367 100644 --- a/aes.c +++ b/aes.c @@ -550,6 +550,8 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co if (extra) { memcpy(output, input, extra); + memset((output + extra), 0, (BLOCKLEN - extra)); + XorWithIv(output); state = (state_t*)output; Cipher(); }