mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Fuzzers: Add a TinyVG fuzzer
This commit is contained in:
parent
0bdc93bca8
commit
581236b24a
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/581236b24a Pull-request: https://github.com/SerenityOS/serenity/pull/20079 Reviewed-by: https://github.com/LucasChollet ✅
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
Reference in a new issue