1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

Lagom: Make BMP fuzzer look like the other image loader fuzzers

This commit is contained in:
Nico Weber 2020-11-25 09:51:31 -05:00 committed by Andreas Kling
parent 4f12efe191
commit ec4c2f971b
3 changed files with 10 additions and 9 deletions

View file

@ -29,13 +29,6 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
Gfx::BMPImageDecoderPlugin loader { data, size };
auto bitmap = loader.bitmap();
if (!bitmap)
return 1;
if (bitmap->width() >= 100000 || bitmap->height() >= 100000) {
fprintf(stderr, "Silly bitmap: %dx%d pixels?!\n", bitmap->width(), bitmap->height());
ASSERT_NOT_REACHED();
}
Gfx::load_bmp_from_memory(data, size);
return 0;
}