diff options
Diffstat (limited to 'patch_fuzzer.cc')
-rw-r--r-- | patch_fuzzer.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patch_fuzzer.cc b/patch_fuzzer.cc new file mode 100644 index 0000000..2d1c9b7 --- /dev/null +++ b/patch_fuzzer.cc @@ -0,0 +1,19 @@ +// Copyright 2017 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 <stddef.h> +#include <stdint.h> + +#include "base/optional.h" +#include "components/zucchini/buffer_view.h" +#include "components/zucchini/patch_reader.h" + +// Entry point for LibFuzzer. +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + logging::SetMinLogLevel(3); // Disable console spamming. + zucchini::ConstBufferView patch(data, size); + base::Optional<zucchini::EnsemblePatchReader> patch_reader = + zucchini::EnsemblePatchReader::Create(patch); + return 0; +} |