mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
Fuzzers: Add a fuzzer for JsonParser
This commit is contained in:
parent
67ca5d6572
commit
03fbd6c0c8
3 changed files with 16 additions and 0 deletions
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
|
IMAPParser
|
||||||
JPEGLoader
|
JPEGLoader
|
||||||
Js
|
Js
|
||||||
|
JsonParser
|
||||||
Latin1Decoder
|
Latin1Decoder
|
||||||
Latin2Decoder
|
Latin2Decoder
|
||||||
LzmaDecompression
|
LzmaDecompression
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
T(IMAPParser) \
|
T(IMAPParser) \
|
||||||
T(JPEGLoader) \
|
T(JPEGLoader) \
|
||||||
T(Js) \
|
T(Js) \
|
||||||
|
T(JsonParser) \
|
||||||
T(Latin1Decoder) \
|
T(Latin1Decoder) \
|
||||||
T(Latin2Decoder) \
|
T(Latin2Decoder) \
|
||||||
T(LzmaDecompression) \
|
T(LzmaDecompression) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue