aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-07-26 12:05:22 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-07-26 12:06:13 +0200
commit5c8eb7916de7030d6610df53977b3068342c8f24 (patch)
tree365ff155385303c9c3938a45f4f1d69e39e8de0b /src
parent9dd6a2be4188866a147a6043ec54439339091b59 (diff)
parent065039da1f83d0fe5b74d3b33be6d48e19d78d7f (diff)
Merge #10912: [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp
065039d [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp (practicalswift) Pull request description: `chKey` and `chIV` are pointers, not arrays :-) Probably the result of copy-pasting of old code where the code was operating on arrays instead of pointers. If I'm reading the code correctly the absence/presence of these `memory_cleanse(…)` calls won't alter the outcome of the test in question (`TestPassphraseSingle`) even if fixed. Therefore removing. Tree-SHA512: a053b2817bedf6ef889744e546ce9a0f165dee94aef6850d9d6a6bb05b0018789597371ecf154a4aec8588c0ef5626ef08c23c35e35927f6b0497b5f086146fe
Diffstat (limited to 'src')
-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;