mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
20f0858f67
LibFuzzer documentation [1] states that all return values except for 0 and -1 are currently reserved for future use. -1 is a special return value that causes LibFuzzer to not add a testing input to the testing corpus, regardless of the code coverage that it causes. [1] https://llvm.org/docs/LibFuzzer.html
15 lines
328 B
C++
15 lines
328 B
C++
/*
|
|
* 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)
|
|
{
|
|
(void)Compress::DeflateCompressor::compress_all(ReadonlyBytes { data, size });
|
|
return 0;
|
|
}
|