Skip to content

Commit 065039d

Browse files
[tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp
chKey and chIV are pointers, not arrays :-) Probably the result of copy-pasting of old code which was operating on arrays instead of pointers.
1 parent 1caafa6 commit 065039d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/test/crypto_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ bool OldSetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<u
2626

2727
if (i != (int)WALLET_CRYPTO_KEY_SIZE)
2828
{
29-
memory_cleanse(chKey, sizeof(chKey));
30-
memory_cleanse(chIV, sizeof(chIV));
29+
memory_cleanse(chKey, WALLET_CRYPTO_KEY_SIZE);
30+
memory_cleanse(chIV, WALLET_CRYPTO_IV_SIZE);
3131
return false;
3232
}
3333
return true;

0 commit comments

Comments
 (0)