mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
Bugfix: randbytes should seed when needed (non reachable issue)
This commit is contained in:
@@ -398,6 +398,7 @@ uint256 FastRandomContext::rand256()
|
||||
|
||||
std::vector<unsigned char> FastRandomContext::randbytes(size_t len)
|
||||
{
|
||||
if (requires_seed) RandomSeed();
|
||||
std::vector<unsigned char> ret(len);
|
||||
if (len > 0) {
|
||||
rng.Output(&ret[0], len);
|
||||
|
||||
Reference in New Issue
Block a user