diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 22:22:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-13 00:55:07 +0100 |
commit | b189c88ec212295d711224ded067c6f5771244c1 (patch) | |
tree | 318a1ed812e355f903c1b2b755e0fda10e57316e /Meta/Lagom/Fuzzers | |
parent | 32d59257d65d9fbdd8c852a60ffa741b68f09029 (diff) | |
download | serenity-b189c88ec212295d711224ded067c6f5771244c1.zip |
Fuzzers: Use ImageDecoders instead of load_FORMAT_from_memory() wrappers
Diffstat (limited to 'Meta/Lagom/Fuzzers')
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzICOLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp | 3 | ||||
-rw-r--r-- | Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp | 3 |
7 files changed, 14 insertions, 7 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp b/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp index 8906d0f532..60c6c9d5db 100644 --- a/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp @@ -9,6 +9,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_bmp_from_memory(data, size); + Gfx::BMPImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp b/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp index 26c0a26e99..ae1caa1ecf 100644 --- a/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_ico_from_memory(data, size); + Gfx::ICOImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp b/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp index ece17d3da8..106049be92 100644 --- a/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_jpg_from_memory(data, size); + Gfx::JPGImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp index 31bfd6fa4e..1074fbcdd8 100644 --- a/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_pbm_from_memory(data, size); + Gfx::PBMImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp index f7794c5742..fd5c64ae79 100644 --- a/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_pgm_from_memory(data, size); + Gfx::PGMImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp index 1d6e96a091..8ea01c17a7 100644 --- a/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_png_from_memory(data, size); + Gfx::PNGImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp index dd0108cc87..211b059ad1 100644 --- a/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp @@ -10,6 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - Gfx::load_ppm_from_memory(data, size); + Gfx::PPMImageDecoderPlugin decoder(data, size); + (void)decoder.bitmap(); return 0; } |