Fuzzers: Use ImageDecoders instead of load_FORMAT_from_memory() wrappers

This commit is contained in:
Andreas Kling 2021-11-11 22:22:32 +01:00
parent 32d59257d6
commit b189c88ec2
Notes: sideshowbarker 2024-07-18 01:13:49 +09:00
7 changed files with 14 additions and 7 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}