mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Meta: Add a fuzzer for the QOILoader
This commit is contained in:
parent
67788641d3
commit
92672b1520
Notes:
sideshowbarker
2024-07-17 22:31:38 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/92672b1520c Pull-request: https://github.com/SerenityOS/serenity/pull/11338 Reviewed-by: https://github.com/Astraeus- Reviewed-by: https://github.com/alimpfard ✅
3 changed files with 22 additions and 0 deletions
|
@ -34,6 +34,7 @@ add_simple_fuzzer(FuzzPBMLoader LagomGfx)
|
|||
add_simple_fuzzer(FuzzPGMLoader LagomGfx)
|
||||
add_simple_fuzzer(FuzzPPMLoader LagomGfx)
|
||||
add_simple_fuzzer(FuzzPDF LagomPDF)
|
||||
add_simple_fuzzer(FuzzQOILoader LagomGfx)
|
||||
add_simple_fuzzer(FuzzQuotedPrintableParser LagomIMAP)
|
||||
add_simple_fuzzer(FuzzHebrewDecoder LagomTextCodec)
|
||||
add_simple_fuzzer(FuzzHttpRequest LagomHTTP)
|
||||
|
|
16
Meta/Lagom/Fuzzers/FuzzQOILoader.cpp
Normal file
16
Meta/Lagom/Fuzzers/FuzzQOILoader.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibGfx/QOILoader.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Gfx::QOIImageDecoderPlugin decoder(data, size);
|
||||
(void)decoder.frame(0);
|
||||
return 0;
|
||||
}
|
|
@ -24,6 +24,7 @@
|
|||
T(PGMLoader) \
|
||||
T(PNGLoader) \
|
||||
T(PPMLoader) \
|
||||
T(QOILoader) \
|
||||
T(RegexECMA262) \
|
||||
T(RegexPosixExtended) \
|
||||
T(Shell) \
|
||||
|
@ -87,6 +88,10 @@ ENUMERATE_TARGETS(__ENUMERATE_TARGET)
|
|||
#include <Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp>
|
||||
#undef LLVMFuzzerTestOneInput
|
||||
|
||||
#define LLVMFuzzerTestOneInput TestQOILoader
|
||||
#include <Meta/Lagom/Fuzzers/FuzzQOILoader.cpp>
|
||||
#undef LLVMFuzzerTestOneInput
|
||||
|
||||
#define LLVMFuzzerTestOneInput TestRegexECMA262
|
||||
#include <Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp>
|
||||
#undef LLVMFuzzerTestOneInput
|
||||
|
|
Loading…
Reference in a new issue