xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/common/structured_headers_fuzzer.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "absl/strings/string_view.h"
6 #include "quiche/common/structured_headers.h"
7 
8 namespace quiche {
9 namespace structured_headers {
10 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)11 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
12   absl::string_view input(reinterpret_cast<const char*>(data), size);
13   ParseItem(input);
14   ParseListOfLists(input);
15   ParseList(input);
16   ParseDictionary(input);
17   ParseParameterisedList(input);
18   return 0;
19 }
20 
21 }  // namespace structured_headers
22 }  // namespace quiche
23