diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 832ca33a5..f67fb9e5f 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1641,7 +1641,8 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr // Randomize entries before processing, to prevent an attacker to // determine which entries will make it through the rate limit - random_shuffle(vAddr.begin(), vAddr.end(), GetRandInt); + FastRandomContext insecure_rand; + shuffle(vAddr.begin(), vAddr.end(), insecure_rand); BOOST_FOREACH(CAddress& addr, vAddr) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0d59c548a..58f69aa96 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2157,6 +2157,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin { setCoinsRet.clear(); nValueRet = 0; + FastRandomContext insecure_rand; // List of values less than target pair > coinLowestLarger; @@ -2165,7 +2166,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin vector > > vValue; CAmount nTotalLower = 0; - random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); + shuffle(vCoins.begin(), vCoins.end(), insecure_rand); BOOST_FOREACH(const COutput &output, vCoins) {