ladybird/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp
Lucas CHOLLET 4291288a31 LibGfx: Remove ImageDecoderPlugin::initialize()
No plugin is currently overriding the default implementation, which is a
no-op. So we can safely delete it.
2023-07-18 14:34:35 +01:00

20 lines
493 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/ImageFormats/ICOLoader.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
auto decoder_or_error = Gfx::ICOImageDecoderPlugin::create({ data, size });
if (decoder_or_error.is_error())
return 0;
auto decoder = decoder_or_error.release_value();
(void)decoder->frame(0);
return 0;
}