lookup_string_in_fixed_set_fuzzer.cc 607 B

12345678910111213141516171819
  1. // Copyright 2020 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. #include <stddef.h>
  5. #include <stdint.h>
  6. #include "net/base/lookup_string_in_fixed_set.h"
  7. namespace {
  8. #include "net/base/registry_controlled_domains/effective_tld_names-inc.cc"
  9. } // namespace
  10. // Entry point for LibFuzzer.
  11. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  12. net::LookupStringInFixedSet(kDafsa, sizeof(kDafsa),
  13. reinterpret_cast<const char*>(data), size);
  14. return 0;
  15. }