ladybird/Meta/Lagom/Fuzzers/FuzzShell.cpp

19 lines
422 B
C++
Raw Normal View History

2020-11-29 09:49:13 -03:00
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
2020-11-29 09:49:13 -03:00
*/
#include <AK/StringView.h>
#include <Shell/Shell.h>
#include <stddef.h>
#include <stdint.h>
2022-04-01 14:58:27 -03:00
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
2020-11-29 09:49:13 -03:00
{
2022-04-01 14:58:27 -03:00
auto source = StringView(static_cast<unsigned char const*>(data), size);
2020-11-29 09:49:13 -03:00
Shell::Parser parser(source);
(void)parser.parse();
2020-11-29 09:49:13 -03:00
return 0;
}