mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
Meta: Add a Shell --posix
parser fuzzer
This commit is contained in:
parent
eb20fbe145
commit
617d112780
2 changed files with 20 additions and 0 deletions
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
Add a link
Reference in a new issue