Lagom/Fuzzers: Add XML parser fuzzer

This commit is contained in:
Luke Wilde 2022-05-29 22:52:57 +01:00 committed by Linus Groh
parent adb5f7e485
commit 80a074b2e4
Notes: sideshowbarker 2024-07-17 10:54:57 +09:00
2 changed files with 15 additions and 0 deletions

View file

@ -66,6 +66,7 @@ add_simple_fuzzer(FuzzRSAKeyParsing LagomCrypto)
add_simple_fuzzer(FuzzWAVLoader LagomAudio)
add_simple_fuzzer(FuzzWasmParser LagomWasm)
add_simple_fuzzer(FuzzWOFF LagomGfx)
add_simple_fuzzer(FuzzXML LagomXML)
add_simple_fuzzer(FuzzZip LagomArchive)
add_simple_fuzzer(FuzzZlibDecompression LagomCompress)

View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibXML/Parser/Parser.h>
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
{
XML::Parser parser({ data, size });
(void)parser.parse();
return 0;
}