| // Copyright 2018 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifdef UNSAFE_BUFFERS_BUILD |
| // TODO(crbug.com/40284755): Remove this and spanify to fix the errors. |
| #pragma allow_unsafe_buffers |
| #include "base/strings/string_util.h" |
| #include "net/dns/dns_config_service_win.h" |
| extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| std::wstring_view widestr(reinterpret_cast<const wchar_t*>(data), size / 2); |
| std::string result = net::internal::ParseDomainASCII(widestr); |
| // Call base::ToLowerASCII to get some additional code coverage signal. |
| result = base::ToLowerASCII(result); |