]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/fuzzer/uregex_open_fuzzer.cpp
1 // © 2019 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
9 #include "fuzzer_utils.h"
10 #include "unicode/regex.h"
12 IcuEnvironment
* env
= new IcuEnvironment();
14 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data
, size_t size
) {
15 UParseError pe
= { 0 };
16 UErrorCode status
= U_ZERO_ERROR
;
18 URegularExpression
* re
= uregex_open(reinterpret_cast<const UChar
*>(data
),
19 static_cast<int>(size
) / sizeof(UChar
),