OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <stdint.h> |
| 6 |
| 7 #include "third_party/icu/source/i18n/unicode/regex.h" |
| 8 |
| 9 // Entry point for LibFuzzer. |
| 10 extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) { |
| 11 UParseError pe = { 0 }; |
| 12 UErrorCode status = U_ZERO_ERROR; |
| 13 URegularExpression* re = uregex_open(reinterpret_cast<const UChar*>(data), |
| 14 size / sizeof(UChar), |
| 15 0, &pe, &status); |
| 16 if (re) |
| 17 uregex_close(re); |
| 18 |
| 19 return 0; |
| 20 } |
OLD | NEW |