Fuzzers: Add WOFF2 fuzzer

This commit is contained in:
Tim Ledbetter 2023-10-24 07:54:20 +01:00 committed by Andreas Kling
parent e9be1bcd09
commit fff1645c6b
Notes: sideshowbarker 2024-07-16 18:26:46 +09:00
3 changed files with 17 additions and 0 deletions

View file

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

View file

@ -62,6 +62,7 @@ set(FUZZER_TARGETS
WAVLoader
WebPLoader
WOFF
WOFF2
XML
Zip
ZlibDecompression
@ -133,6 +134,7 @@ set(FUZZER_DEPENDENCIES_WasmParser LibWasm)
set(FUZZER_DEPENDENCIES_WAVLoader LibAudio)
set(FUZZER_DEPENDENCIES_WebPLoader LibGfx)
set(FUZZER_DEPENDENCIES_WOFF LibGfx)
set(FUZZER_DEPENDENCIES_WOFF2 LibGfx)
set(FUZZER_DEPENDENCIES_XML LibXML)
set(FUZZER_DEPENDENCIES_Zip LibArchive)
set(FUZZER_DEPENDENCIES_ZlibDecompression LibCompress)

View file

@ -76,6 +76,7 @@
T(WAVLoader) \
T(WebPLoader) \
T(WOFF) \
T(WOFF2) \
T(XML) \
T(Zip) \
T(ZlibDecompression)