mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 12:12:41 +01:00
addrman: cap the max_pct to not exceed the maximum number of addresses
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
@@ -173,7 +173,7 @@ FUZZ_TARGET(addrman, .init = initialize_addrman)
|
||||
network = fuzzed_data_provider.PickValueInArray(ALL_NETWORKS);
|
||||
}
|
||||
auto max_addresses = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096);
|
||||
auto max_pct = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096);
|
||||
auto max_pct = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 100);
|
||||
auto filtered = fuzzed_data_provider.ConsumeBool();
|
||||
(void)const_addr_man.GetAddr(max_addresses, max_pct, network, filtered);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user