diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-01-06 17:16:23 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-10 11:15:38 +0100 |
commit | fa7238300c18938cdf627cacfc58d4b81602417f (patch) | |
tree | 0c1717267eadd3b8483149adb420e6fa72cb93f6 | |
parent | 3d0850cec103950731bfc0f935ad997a4149d4b3 (diff) | |
download | bitcoin-fa7238300c18938cdf627cacfc58d4b81602417f.tar.xz |
fuzz: Limit fuzzed time to years 2000-2100
-rw-r--r-- | src/test/fuzz/util.cpp | 4 | ||||
-rw-r--r-- | test/sanitizer_suppressions/ubsan | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/test/fuzz/util.cpp b/src/test/fuzz/util.cpp index f89b597eed..47c2be3faa 100644 --- a/src/test/fuzz/util.cpp +++ b/src/test/fuzz/util.cpp @@ -281,8 +281,8 @@ CAmount ConsumeMoney(FuzzedDataProvider& fuzzed_data_provider, const std::option int64_t ConsumeTime(FuzzedDataProvider& fuzzed_data_provider, const std::optional<int64_t>& min, const std::optional<int64_t>& max) noexcept { // Avoid t=0 (1970-01-01T00:00:00Z) since SetMockTime(0) disables mocktime. - static const int64_t time_min = ParseISO8601DateTime("1970-01-01T00:00:01Z"); - static const int64_t time_max = ParseISO8601DateTime("9999-12-31T23:59:59Z"); + static const int64_t time_min{ParseISO8601DateTime("2000-01-01T00:00:01Z")}; + static const int64_t time_max{ParseISO8601DateTime("2100-12-31T23:59:59Z")}; return fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(min.value_or(time_min), max.value_or(time_max)); } diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan index 6e4ac80927..e2195c5042 100644 --- a/test/sanitizer_suppressions/ubsan +++ b/test/sanitizer_suppressions/ubsan @@ -96,7 +96,6 @@ implicit-signed-integer-truncation:chain.h implicit-signed-integer-truncation:crypto/ implicit-signed-integer-truncation:node/miner.cpp implicit-signed-integer-truncation:net.cpp -implicit-signed-integer-truncation:net_processing.cpp implicit-signed-integer-truncation:streams.h implicit-signed-integer-truncation:test/arith_uint256_tests.cpp implicit-signed-integer-truncation:test/skiplist_tests.cpp |