summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp
blob: 19a535931a55129ca6bac7eabf2d1505a3ed254b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibCompress/Zlib.h>
#include <stdio.h>

extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
    auto result = Compress::Zlib::decompress_all(ReadonlyBytes { data, size });
    return result.has_value();
}