fuzz: Use ConsumeRandomLengthBitVector(...) in src/test/fuzz/connman and src/test/fuzz/net

pull/764/head
practicalswift 4 years ago
parent e6bb9fde85
commit d04a17a790

@ -117,7 +117,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
connman.RemoveAddedNode(random_string); connman.RemoveAddedNode(random_string);
break; break;
case 24: { case 24: {
const std::vector<bool> asmap = ConsumeRandomLengthIntegralVector<bool>(fuzzed_data_provider, 512); const std::vector<bool> asmap = ConsumeRandomLengthBitVector(fuzzed_data_provider);
if (SanityCheckASMap(asmap)) { if (SanityCheckASMap(asmap)) {
connman.SetAsmap(asmap); connman.SetAsmap(asmap);
} }

@ -63,7 +63,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
break; break;
} }
case 3: { case 3: {
const std::vector<bool> asmap = ConsumeRandomLengthIntegralVector<bool>(fuzzed_data_provider, 128); const std::vector<bool> asmap = ConsumeRandomLengthBitVector(fuzzed_data_provider);
if (!SanityCheckASMap(asmap)) { if (!SanityCheckASMap(asmap)) {
break; break;
} }

Loading…
Cancel
Save