ladybird/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp

17 lines
343 B
C++
Raw Normal View History

2020-11-19 16:41:43 +00:00
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
2020-11-19 16:41:43 +00:00
*/
#include <LibGfx/JPGLoader.h>
#include <stddef.h>
#include <stdint.h>
2022-04-01 17:58:27 +00:00
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
2020-11-19 16:41:43 +00:00
{
Gfx::JPGImageDecoderPlugin decoder(data, size);
(void)decoder.frame(0);
2020-11-19 16:41:43 +00:00
return 0;
}