Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/common/http/utility_fuzz_test.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <set>

#include "common/http/utility.h"

#include "test/common/http/utility_fuzz.pb.validate.h"
Expand Down Expand Up @@ -79,6 +81,15 @@ DEFINE_PROTO_FUZZER(const test::common::http::UtilityTestCase& input) {
}
case test::common::http::UtilityTestCase::kInitializeAndValidate: {
const auto& options = input.initialize_and_validate();
// if there are duplicates, abort the test
Comment thread
asraa marked this conversation as resolved.
Outdated
std::set<int> uniques;
for (auto& setting : options.custom_settings_parameters()) {
uniques.insert(setting.identifier().value());
}
// protobuf repeated's size is a signed integer
if (uniques.size() != static_cast<uint32_t>(options.custom_settings_parameters().size())) {
break;
}
Http2::Utility::initializeAndValidateOptions(options);
break;
}
Expand Down