/src/serenity/Meta/Lagom/Fuzzers/FuzzRegexPosixBasic.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <AK/StringView.h> |
8 | | #include <LibRegex/Regex.h> |
9 | | #include <stddef.h> |
10 | | #include <stdint.h> |
11 | | |
12 | | extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) |
13 | 88.2k | { |
14 | 88.2k | AK::set_debug_enabled(false); |
15 | 88.2k | auto pattern = StringView(static_cast<unsigned char const*>(data), size); |
16 | 88.2k | [[maybe_unused]] auto re = Regex<PosixBasic>(pattern); |
17 | 88.2k | return 0; |
18 | 88.2k | } |