mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
[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.
This commit is contained in:
parent
1caafa6cde
commit
065039da1f
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ bool OldSetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<u
|
||||||
|
|
||||||
if (i != (int)WALLET_CRYPTO_KEY_SIZE)
|
if (i != (int)WALLET_CRYPTO_KEY_SIZE)
|
||||||
{
|
{
|
||||||
memory_cleanse(chKey, sizeof(chKey));
|
memory_cleanse(chKey, WALLET_CRYPTO_KEY_SIZE);
|
||||||
memory_cleanse(chIV, sizeof(chIV));
|
memory_cleanse(chIV, WALLET_CRYPTO_IV_SIZE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue