1 // Copyright 2015 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 <stddef.h> 11 #include <stdint.h> 12 13 #include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_framer.h" 14 15 // Entry point for LibFuzzer. LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)16extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 17 std::string_view crypto_input(reinterpret_cast<const char*>(data), size); 18 std::unique_ptr<quic::CryptoHandshakeMessage> handshake_message( 19 quic::CryptoFramer::ParseMessage(crypto_input)); 20 21 return 0; 22 } 23