Fuzzers: Add a fuzzer for JsonParser
This commit is contained in:
parent
67ca5d6572
commit
03fbd6c0c8
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/03fbd6c0c8 Pull-request: https://github.com/SerenityOS/serenity/pull/21544
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
|
||||
JPEGLoader
|
||||
Js
|
||||
JsonParser
|
||||
Latin1Decoder
|
||||
Latin2Decoder
|
||||
LzmaDecompression
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
T(IMAPParser) \
|
||||
T(JPEGLoader) \
|
||||
T(Js) \
|
||||
T(JsonParser) \
|
||||
T(Latin1Decoder) \
|
||||
T(Latin2Decoder) \
|
||||
T(LzmaDecompression) \
|
||||
|
|
Loading…
Add table
Reference in a new issue