summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aes.c2
1 files changed, 2 insertions, 0 deletions
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();
}