ladybird/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp

15 lines
351 B
C++
Raw Normal View History

/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCompress/Gzip.h>
#include <stdio.h>
2022-04-01 17:58:27 +00:00
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
auto result = Compress::GzipDecompressor::decompress_all(ReadonlyBytes { data, size });
return result.has_value();
}