summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp
blob: b1167f25272138d1a1b4aba0ec161cbff462b6a6 (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/Deflate.h>
#include <stdio.h>

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