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,7 +1628,8 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
||||
#endif
|
||||
|
||||
/* if input and output same will overwrite input iv */
|
||||
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
||||
if ((const byte*)aes->tmp != inBlock)
|
||||
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
||||
AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key,
|
||||
aes->rounds);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user