aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-07-22 23:52:57 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-07-26 01:48:40 +0200
commit065039da1f83d0fe5b74d3b33be6d48e19d78d7f (patch)
treedc858e8813a34ac92452d9530c95b40b10520fce
parent1caafa6cde3b88d926611771f9b4c06fcc6e0007 (diff)
downloadbitcoin-065039da1f83d0fe5b74d3b33be6d48e19d78d7f.tar.xz
[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.
-rw-r--r--src/wallet/test/crypto_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/crypto_tests.cpp b/src/wallet/test/crypto_tests.cpp
index 524a72c303..744063624c 100644
--- a/src/wallet/test/crypto_tests.cpp
+++ b/src/wallet/test/crypto_tests.cpp
@@ -26,8 +26,8 @@ bool OldSetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<u
if (i != (int)WALLET_CRYPTO_KEY_SIZE)
{
- memory_cleanse(chKey, sizeof(chKey));
- memory_cleanse(chIV, sizeof(chIV));
+ memory_cleanse(chKey, WALLET_CRYPTO_KEY_SIZE);
+ memory_cleanse(chIV, WALLET_CRYPTO_IV_SIZE);
return false;
}
return true;