1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

Lagom/Fuzzers: Add fuzzer for POSIX basic regex parser

This commit is contained in:
Luke 2021-07-12 21:48:27 +01:00 committed by Ali Mohammad Pur
parent 2a1bf53435
commit 93340685ed
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/StringView.h>
#include <LibRegex/Regex.h>
#include <stddef.h>
#include <stdint.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
auto pattern = StringView(static_cast<const unsigned char*>(data), size);
[[maybe_unused]] auto re = Regex<PosixBasic>(pattern);
return 0;
}