forked from wolfSSL/wolfssl
Fixes
When building with GCC-8 and enable-intelasm set, GCC reported a memcpy from and two the same pointer being possible. Added a check for the same pointer and skipped the copy if the same.
This commit is contained in:
@@ -1628,6 +1628,7 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* if input and output same will overwrite input iv */
|
/* if input and output same will overwrite input iv */
|
||||||
|
if ((const byte*)aes->tmp != inBlock)
|
||||||
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
||||||
AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key,
|
AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key,
|
||||||
aes->rounds);
|
aes->rounds);
|
||||||
|
Reference in New Issue
Block a user