diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-10-31 14:25:11 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-12-12 14:22:12 -0800 |
commit | 8d98d426116f0178612f14d1874d331042c4c4b7 (patch) | |
tree | 9ca9e096ec04b5b1332578a06b26a9acc43467ec /src/random.cpp | |
parent | 273d02580aa736b7ccea8fce51d90541665fdbd1 (diff) |
Bugfix: randbytes should seed when needed (non reachable issue)
Diffstat (limited to 'src/random.cpp')
-rw-r--r-- | src/random.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/random.cpp b/src/random.cpp index a34c70e1d5..ebc2ff42c8 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -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); |