From 184e9c409080ceb84516f0fff0aa1fa6488ae848 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 19 May 2017 14:10:50 -0700 Subject: [PATCH] Fix typo from intermediate change for unaligned CBC fixes. Thanks Nick. --- wolfcrypt/src/aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index e8a8b2b28..a8cba6d70 100755 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -2375,7 +2375,7 @@ int wc_AesSetIV(Aes* aes, const byte* iv) CRYP_IVStructInit(&AES_CRYP_IVInitStructure); /* if input and output same will overwrite input iv */ - XMEMCPY(aes->tmp, in + len - AES_BLOCK_SIZE, AES_BLOCK_SIZE); + XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE); /* reset registers to their default values */ CRYP_DeInit();