Lagom/Fuzzers: Add fuzzer for ICCProfile

This commit is contained in:
Nico Weber 2023-01-17 19:30:51 -05:00 committed by Tim Flynn
parent 79547896b7
commit cbb6f8de65
Notes: sideshowbarker 2024-07-17 03:03:44 +09:00
2 changed files with 16 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,15 @@
/*
* Copyright (c) 2023, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/ICCProfile.h>
#include <stddef.h>
#include <stdint.h>
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;
}