blob: b6a10efd9d681c0f2724f5801650b2c47bc79466 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/dns/dns_config_service_win.h"
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size > 8 * 1024)
return 0;
base::WStringPiece widestr(reinterpret_cast<const wchar_t*>(data), size / 2);
std::string result = net::internal::ParseDomainASCII(widestr);
if (!result.empty())
// Call base::ToLowerASCII to get some additional code coverage signal.
result = base::ToLowerASCII(result);
return 0;