xref: /aosp_15_r20/external/cronet/net/base/lookup_string_in_fixed_set_fuzzer.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2020 The Chromium Authors
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 <stddef.h>
6 #include <stdint.h>
7 
8 #include "net/base/lookup_string_in_fixed_set.h"
9 
10 namespace {
11 #include "net/base/registry_controlled_domains/effective_tld_names-inc.cc"
12 }  // namespace
13 
14 // Entry point for LibFuzzer.
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)15 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
16   net::LookupStringInFixedSet(kDafsa, sizeof(kDafsa),
17                               reinterpret_cast<const char*>(data), size);
18   return 0;
19 }
20