From 4eedf4ffeea6a3734f245f785a8d82d69634dccd Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Wed, 9 Jul 2014 09:43:55 +0200 Subject: [PATCH] make RandAddSeed() use OPENSSL_cleanse() - removes the cstring include and is also used in RandAddSeedPerfmon() --- src/random.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/random.cpp b/src/random.cpp index 4c7f150f7..0d20d205a 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -13,7 +13,6 @@ #ifndef WIN32 #include #endif -#include // for memset() #include #include @@ -37,7 +36,7 @@ void RandAddSeed() // Seed with CPU performance counter int64_t nCounter = GetPerformanceCounter(); RAND_add(&nCounter, sizeof(nCounter), 1.5); - memset(&nCounter, 0, sizeof(nCounter)); + OPENSSL_cleanse((void*)&nCounter, sizeof(nCounter)); } void RandAddSeedPerfmon()