fuzz: correct CAddrMan GetAddr arguments, cap to 4096

This commit is contained in:
Kittywhiskers Van Gogh 2023-07-14 14:34:55 +00:00 committed by UdjinM6
parent 7f2fb78ded
commit 49805c11a5

View File

@ -61,7 +61,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
(void)addr_man.Select(fuzzed_data_provider.ConsumeBool());
},
[&] {
(void)addr_man.GetAddr(fuzzed_data_provider.ConsumeIntegral<size_t>(), fuzzed_data_provider.ConsumeIntegral<size_t>());
(void)addr_man.GetAddr(fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096), fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096));
},
[&] {
const std::optional<CAddress> opt_address = ConsumeDeserializable<CAddress>(fuzzed_data_provider);