// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include #include #include #include "zlib.h" static Bytef buffer[256 * 1024] = {0}; // Entry point for LibFuzzer. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { uLongf buffer_length = static_cast(sizeof(buffer)); if (Z_OK != uncompress(buffer, &buffer_length, data, static_cast(size))) { return 0; } return 0; }