2020-11-28 14:48:01 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-11-28 14:48:01 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <AK/StringView.h>
|
2026-03-25 06:52:59 -03:00
|
|
|
#include <LibRegex/ECMAScriptRegex.h>
|
2020-11-28 14:48:01 -03:00
|
|
|
#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-28 14:48:01 -03:00
|
|
|
{
|
2023-11-03 14:49:54 -03:00
|
|
|
AK::set_debug_enabled(false);
|
2022-04-01 14:58:27 -03:00
|
|
|
auto pattern = StringView(static_cast<unsigned char const*>(data), size);
|
2026-03-25 06:52:59 -03:00
|
|
|
[[maybe_unused]] auto re = regex::ECMAScriptRegex::compile(pattern, {});
|
2020-11-28 14:48:01 -03:00
|
|
|
return 0;
|
|
|
|
|
}
|