Fuzzers: Add a fuzzer for JsonParser

This commit is contained in:
Tim Ledbetter 2023-10-22 16:03:52 +01:00 committed by Andreas Kling
parent 67ca5d6572
commit 03fbd6c0c8
Notes: sideshowbarker 2024-07-16 23:23:26 +09:00
3 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2023, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/JsonParser.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
JsonParser parser({ data, size });
(void)parser.parse();
return 0;
}

View file

@ -21,6 +21,7 @@ set(FUZZER_TARGETS
IMAPParser
JPEGLoader
Js
JsonParser
Latin1Decoder
Latin2Decoder
LzmaDecompression

View file

@ -35,6 +35,7 @@
T(IMAPParser) \
T(JPEGLoader) \
T(Js) \
T(JsonParser) \
T(Latin1Decoder) \
T(Latin2Decoder) \
T(LzmaDecompression) \