mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
Lagom/Fuzzers: Add fuzzer for the TGALoader code
This commit is contained in:
parent
71f275b5ad
commit
b2626d3bc1
3 changed files with 22 additions and 0 deletions
|
@ -43,6 +43,7 @@ add_simple_fuzzer(FuzzPoly1305 LibCrypto)
|
||||||
add_simple_fuzzer(FuzzPPMLoader LibGfx)
|
add_simple_fuzzer(FuzzPPMLoader LibGfx)
|
||||||
add_simple_fuzzer(FuzzPDF LibPDF)
|
add_simple_fuzzer(FuzzPDF LibPDF)
|
||||||
add_simple_fuzzer(FuzzQOILoader LibGfx)
|
add_simple_fuzzer(FuzzQOILoader LibGfx)
|
||||||
|
add_simple_fuzzer(FuzzTGALoader LibGfx)
|
||||||
add_simple_fuzzer(FuzzQuotedPrintableParser LibIMAP)
|
add_simple_fuzzer(FuzzQuotedPrintableParser LibIMAP)
|
||||||
add_simple_fuzzer(FuzzHebrewDecoder LibTextCodec)
|
add_simple_fuzzer(FuzzHebrewDecoder LibTextCodec)
|
||||||
add_simple_fuzzer(FuzzHttpRequest LibHTTP)
|
add_simple_fuzzer(FuzzHttpRequest LibHTTP)
|
||||||
|
|
16
Meta/Lagom/Fuzzers/FuzzTGALoader.cpp
Normal file
16
Meta/Lagom/Fuzzers/FuzzTGALoader.cpp
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibGfx/TGALoader.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||||
|
{
|
||||||
|
Gfx::TGAImageDecoderPlugin decoder(data, size);
|
||||||
|
(void)decoder.frame(0);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -25,6 +25,7 @@
|
||||||
T(PNGLoader) \
|
T(PNGLoader) \
|
||||||
T(PPMLoader) \
|
T(PPMLoader) \
|
||||||
T(QOILoader) \
|
T(QOILoader) \
|
||||||
|
T(TGALoader) \
|
||||||
T(RegexECMA262) \
|
T(RegexECMA262) \
|
||||||
T(RegexPosixExtended) \
|
T(RegexPosixExtended) \
|
||||||
T(Shell) \
|
T(Shell) \
|
||||||
|
@ -92,6 +93,10 @@ ENUMERATE_TARGETS(__ENUMERATE_TARGET)
|
||||||
#include <Meta/Lagom/Fuzzers/FuzzQOILoader.cpp>
|
#include <Meta/Lagom/Fuzzers/FuzzQOILoader.cpp>
|
||||||
#undef LLVMFuzzerTestOneInput
|
#undef LLVMFuzzerTestOneInput
|
||||||
|
|
||||||
|
#define LLVMFuzzerTestOneInput TestTGALoader
|
||||||
|
#include <Meta/Lagom/Fuzzers/FuzzTGALoader.cpp>
|
||||||
|
#undef LLVMFuzzerTestOneInput
|
||||||
|
|
||||||
#define LLVMFuzzerTestOneInput TestRegexECMA262
|
#define LLVMFuzzerTestOneInput TestRegexECMA262
|
||||||
#include <Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp>
|
#include <Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp>
|
||||||
#undef LLVMFuzzerTestOneInput
|
#undef LLVMFuzzerTestOneInput
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue