mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Fuzzers: Use ImageDecoders instead of load_FORMAT_from_memory() wrappers
This commit is contained in:
parent
32d59257d6
commit
b189c88ec2
Notes:
sideshowbarker
2024-07-18 01:13:49 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b189c88ec21
7 changed files with 14 additions and 7 deletions
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue