Meta/Lagom: Add a fuzzer for the WOFF parser

This commit is contained in:
Simon Wanner 2022-04-09 22:13:37 +02:00 committed by Andreas Kling
parent b19e134999
commit 4cbbb72ce8
Notes: sideshowbarker 2024-07-17 14:12:26 +09:00
2 changed files with 15 additions and 0 deletions

View file

@ -64,6 +64,7 @@ add_simple_fuzzer(FuzzUTF16BEDecoder LagomTextCodec)
add_simple_fuzzer(FuzzRSAKeyParsing LagomCrypto)
add_simple_fuzzer(FuzzWAVLoader LagomAudio)
add_simple_fuzzer(FuzzWasmParser LagomWasm)
add_simple_fuzzer(FuzzWOFF LagomGfx)
add_simple_fuzzer(FuzzZip LagomArchive)
add_simple_fuzzer(FuzzZlibDecompression LagomCompress)

View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/Font/WOFF/Font.h>
#include <stddef.h>
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
{
(void)WOFF::Font::try_load_from_externally_owned_memory({ data, size });
return 0;
}