Skip to content

Commit

Permalink
Merge bitcoin#29413: fuzz: increase length of string used for `NetWhi…
Browse files Browse the repository at this point in the history
…telist{bind}Permissions::TryParse`

864e2e9 fuzz: increase length of string used for `NetWhitelist{bind}Permissions::TryParse` (brunoerg)

Pull request description:

  The string `s` represents the value from `-whitelist`/`-whitebind` (e.g. "bloom,forcerelay,[email protected]:32") and it is used in `NetWhitelistPermissions::TryParse` and `NetWhitebindPermissions::TryParse`. However, a max length of 32 is not enough to cover a lot of cases. Even disconsidering the permissions, 32 would not be enough to cover a lot of addresses. This PR fixes it.

ACKs for top commit:
  maflcko:
    lgtm ACK 864e2e9
  epiccurious:
    utACK 864e2e9.
  vasild:
    ACK 864e2e9

Tree-SHA512: 2b89031b9f2ea92d636f05fd167b1e5ac726742a7e7c1af8ddaeaf90236e659731aaa6b7c23f65ec16ce52ac1b9e68e7b16e23c59e355312d057e001976d172a
  • Loading branch information
fanquake committed Feb 13, 2024
2 parents f83565d + 864e2e9 commit d7dabdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/fuzz/net_permissions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
FUZZ_TARGET(net_permissions)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const std::string s = fuzzed_data_provider.ConsumeRandomLengthString(32);
const std::string s = fuzzed_data_provider.ConsumeRandomLengthString(1000);
const NetPermissionFlags net_permission_flags = ConsumeWeakEnum(fuzzed_data_provider, ALL_NET_PERMISSION_FLAGS);

NetWhitebindPermissions net_whitebind_permissions;
Expand Down

0 comments on commit d7dabdb

Please sign in to comment.