1 // Copyright 2023 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 #ifdef UNSAFE_BUFFERS_BUILD 6 // TODO(crbug.com/40284755): Remove this and spanify to fix the errors. 7 #pragma allow_unsafe_buffers 8 #endif 9 10 #include "net/base/host_port_pair.h" 11 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)12extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 13 const std::string test_data(reinterpret_cast<const char*>(data), size); 14 net::HostPortPair::FromString(test_data); 15 return 0; 16 } 17