quic_crypto_framer_parse_message_fuzzer.cc 604 B

1234567891011121314151617
  1. // Copyright 2015 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/third_party/quiche/src/quiche/quic/core/crypto/crypto_framer.h"
  7. // Entry point for LibFuzzer.
  8. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  9. absl::string_view crypto_input(reinterpret_cast<const char*>(data), size);
  10. std::unique_ptr<quic::CryptoHandshakeMessage> handshake_message(
  11. quic::CryptoFramer::ParseMessage(crypto_input));
  12. return 0;
  13. }