ladybird/Meta/Fuzzers/FuzzRegexECMA262.cpp
2026-06-13 10:30:02 -04:00

18 lines
487 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/StringView.h>
#include <LibRegex/ECMAScriptRegex.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
{
AK::set_debug_enabled(false);
auto pattern = StringView(static_cast<unsigned char const*>(data), size);
[[maybe_unused]] auto re = regex::ECMAScriptRegex::compile(pattern, {});
return 0;
}