From 01d0286194bf083deb8bf4f3fd2f9f0c33db1767 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 17 Sep 2009 01:45:26 +0000 Subject: [PATCH] initialize memory to remove Valgrind warning (Zooko, Jeffrey Walton) --- randpool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/randpool.cpp b/randpool.cpp index 11ece6d4..a063c899 100644 --- a/randpool.cpp +++ b/randpool.cpp @@ -19,6 +19,8 @@ NAMESPACE_BEGIN(CryptoPP) RandomPool::RandomPool() : m_pCipher(new AES::Encryption), m_keySet(false) { + memset(m_key, 0, m_key.SizeInBytes()); + memset(m_seed, 0, m_seed.SizeInBytes()); } void RandomPool::IncorporateEntropy(const byte *input, size_t length)