mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Fuzzers: Add a TinyVG fuzzer
This commit is contained in:
parent
0bdc93bca8
commit
581236b24a
3 changed files with 20 additions and 0 deletions
17
Meta/Lagom/Fuzzers/FuzzTinyVGLoader.cpp
Normal file
17
Meta/Lagom/Fuzzers/FuzzTinyVGLoader.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibGfx/ImageFormats/TinyVGLoader.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto decoder_or_error = Gfx::TinyVGImageDecoderPlugin::create({ data, size });
|
||||
if (decoder_or_error.is_error())
|
||||
return 0;
|
||||
auto decoder = decoder_or_error.release_value();
|
||||
(void)decoder->frame(0);
|
||||
return 0;
|
||||
}
|
|
@ -50,6 +50,7 @@ set(FUZZER_TARGETS
|
|||
Tar
|
||||
TGALoader
|
||||
TTF
|
||||
TinyVGLoader
|
||||
URL
|
||||
UTF16BEDecoder
|
||||
VP9Decoder
|
||||
|
@ -118,6 +119,7 @@ set(FUZZER_DEPENDENCIES_SQLParser LibSQL)
|
|||
set(FUZZER_DEPENDENCIES_Tar LibArchive)
|
||||
set(FUZZER_DEPENDENCIES_TGALoader LibGfx)
|
||||
set(FUZZER_DEPENDENCIES_TTF LibGfx)
|
||||
set(FUZZER_DEPENDENCIES_TinyVGLoader LibGfx)
|
||||
set(FUZZER_DEPENDENCIES_UTF16BEDecoder LibTextCodec)
|
||||
set(FUZZER_DEPENDENCIES_VP9Decoder LibVideo)
|
||||
set(FUZZER_DEPENDENCIES_WasmParser LibWasm)
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
T(Tar) \
|
||||
T(TGALoader) \
|
||||
T(TTF) \
|
||||
T(TinyVGLoader) \
|
||||
T(URL) \
|
||||
T(UTF16BEDecoder) \
|
||||
T(VP9Decoder) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue