Unverified Commit 84468b29 authored by kokke's avatar kokke Committed by GitHub
Browse files

Update aes.c

parent 1cd676c2
...@@ -550,6 +550,8 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co ...@@ -550,6 +550,8 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
if (extra) if (extra)
{ {
memcpy(output, input, extra); memcpy(output, input, extra);
memset((output + extra), 0, (BLOCKLEN - extra));
XorWithIv(output);
state = (state_t*)output; state = (state_t*)output;
Cipher(); Cipher();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment