diff --git a/Meta/Lagom/Fuzzers/CMakeLists.txt b/Meta/Lagom/Fuzzers/CMakeLists.txt index 9701184814..0b6eb0f883 100644 --- a/Meta/Lagom/Fuzzers/CMakeLists.txt +++ b/Meta/Lagom/Fuzzers/CMakeLists.txt @@ -30,6 +30,7 @@ add_simple_fuzzer(FuzzGemini LibGemini) add_simple_fuzzer(FuzzGIFLoader LibGfx) add_simple_fuzzer(FuzzGzipCompression LibCompress) add_simple_fuzzer(FuzzGzipDecompression LibCompress) +add_simple_fuzzer(FuzzICCProfile LibGfx) add_simple_fuzzer(FuzzICOLoader LibGfx) add_simple_fuzzer(FuzzJPGLoader LibGfx) add_simple_fuzzer(FuzzMatroskaReader LibVideo) diff --git a/Meta/Lagom/Fuzzers/FuzzICCProfile.cpp b/Meta/Lagom/Fuzzers/FuzzICCProfile.cpp new file mode 100644 index 0000000000..3c6fd041a9 --- /dev/null +++ b/Meta/Lagom/Fuzzers/FuzzICCProfile.cpp @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2023, Nico Weber + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) +{ + (void)Gfx::ICC::Profile::try_load_from_externally_owned_memory({ data, size }); + return 0; +}