2022-04-06 19:16:04 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2023-01-25 19:19:05 +00:00
|
|
|
#include <AK/MemoryStream.h>
|
2022-04-06 19:16:04 +00:00
|
|
|
#include <LibCompress/Brotli.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
|
|
|
{
|
2023-11-03 17:49:54 +00:00
|
|
|
AK::set_debug_enabled(false);
|
2023-01-30 10:05:43 +00:00
|
|
|
FixedMemoryStream bufstream { { data, size } };
|
2022-04-06 19:16:04 +00:00
|
|
|
|
2023-06-08 17:48:05 +00:00
|
|
|
auto brotli_stream = Compress::BrotliDecompressionStream { MaybeOwned<Stream> { bufstream } };
|
2022-04-06 19:16:04 +00:00
|
|
|
|
2022-12-11 16:49:00 +00:00
|
|
|
(void)brotli_stream.read_until_eof();
|
2022-12-05 01:08:04 +00:00
|
|
|
return 0;
|
2022-04-06 19:16:04 +00:00
|
|
|
}
|