1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-02 17:48:11 +00:00
serenity/Meta/Lagom/Fuzzers/FuzzShellPosix.cpp
2023-02-13 23:00:15 +03:30

19 lines
465 B
C++

/*
* 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;
}