1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 21:15:08 +00:00

Meta: Add a fuzzer for the QOILoader

This commit is contained in:
Linus Groh 2021-12-21 12:11:00 +01:00
parent 67788641d3
commit 92672b1520
3 changed files with 22 additions and 0 deletions

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