mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Fuzzers: Add a fuzzer for JsonParser
This commit is contained in:
committed by
Andreas Kling
parent
67ca5d6572
commit
03fbd6c0c8
14
Meta/Lagom/Fuzzers/FuzzJsonParser.cpp
Normal file
14
Meta/Lagom/Fuzzers/FuzzJsonParser.cpp
Normal 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;
|
||||
}
|
||||
@@ -21,6 +21,7 @@ set(FUZZER_TARGETS
|
||||
IMAPParser
|
||||
JPEGLoader
|
||||
Js
|
||||
JsonParser
|
||||
Latin1Decoder
|
||||
Latin2Decoder
|
||||
LzmaDecompression
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
T(IMAPParser) \
|
||||
T(JPEGLoader) \
|
||||
T(Js) \
|
||||
T(JsonParser) \
|
||||
T(Latin1Decoder) \
|
||||
T(Latin2Decoder) \
|
||||
T(LzmaDecompression) \
|
||||
|
||||
Reference in New Issue
Block a user