Meta: Add a Shell --posix
parser fuzzer
This commit is contained in:
parent
eb20fbe145
commit
617d112780
Notes:
sideshowbarker
2024-07-17 08:36:27 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/617d112780 Pull-request: https://github.com/SerenityOS/serenity/pull/17437 Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/linusg
2 changed files with 20 additions and 0 deletions
|
@ -62,6 +62,7 @@ add_simple_fuzzer(FuzzSHA256 LibCrypto)
|
|||
add_simple_fuzzer(FuzzSHA384 LibCrypto)
|
||||
add_simple_fuzzer(FuzzSHA512 LibCrypto)
|
||||
add_simple_fuzzer(FuzzShell LibShell)
|
||||
add_simple_fuzzer(FuzzShellPosix LibShell)
|
||||
add_simple_fuzzer(FuzzSQLParser LibSQL)
|
||||
add_simple_fuzzer(FuzzTar LibArchive)
|
||||
add_simple_fuzzer(FuzzTTF LibGfx)
|
||||
|
|
19
Meta/Lagom/Fuzzers/FuzzShellPosix.cpp
Normal file
19
Meta/Lagom/Fuzzers/FuzzShellPosix.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2023, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/StringView.h>
|
||||
#include <Shell/PosixParser.h>
|
||||
#include <Shell/Shell.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
auto source = StringView(static_cast<unsigned char const*>(data), size);
|
||||
Shell::Posix::Parser parser(source);
|
||||
(void)parser.parse();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue