diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-11-19 21:25:14 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-12-01 13:18:34 +0000 |
commit | 8c09c0c1d18885ef94f79b3f2d073f43269bc95d (patch) | |
tree | 3279e20f8757142551941c4c271f50e8df3211df /src/test/fuzz/connman.cpp | |
parent | dfd0b700886cab7cd2fcf4958a214b098fe18152 (diff) |
fuzz: Avoid time-based "non-determinism" in fuzzing harnesses by using mocked GetTime()
Diffstat (limited to 'src/test/fuzz/connman.cpp')
-rw-r--r-- | src/test/fuzz/connman.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp index 6521c3f3b2..b5d402cdd3 100644 --- a/src/test/fuzz/connman.cpp +++ b/src/test/fuzz/connman.cpp @@ -23,6 +23,7 @@ void initialize() void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()}; + SetMockTime(ConsumeTime(fuzzed_data_provider)); CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeBool()}; CAddress random_address; CNetAddr random_netaddr; |