summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp
blob: 239fed717580e9017bbade3a8c8a66134c2afb2c (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/Gzip.h>
#include <stdio.h>

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