• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 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 
5 #include <stddef.h>
6 #include <stdint.h>
7 
8 #include "components/zucchini/buffer_view.h"
9 #include "components/zucchini/patch_reader.h"
10 #include "third_party/abseil-cpp/absl/types/optional.h"
11 
12 // Entry point for LibFuzzer.
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)13 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
14   logging::SetMinLogLevel(3);  // Disable console spamming.
15   zucchini::ConstBufferView patch(data, size);
16   absl::optional<zucchini::EnsemblePatchReader> patch_reader =
17       zucchini::EnsemblePatchReader::Create(patch);
18   return 0;
19 }
20