From f1d0beed71e4feacf6d6fc8ddfa90f057fe3053b Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 20 Jan 2017 17:40:14 -0800 Subject: [PATCH] make two icu fuzz targets more useful (#304) --- projects/icu/break_iterator_fuzzer.cc | 1 + projects/icu/break_iterator_utf32_fuzzer.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/icu/break_iterator_fuzzer.cc b/projects/icu/break_iterator_fuzzer.cc index 143a74dae..230e80ed1 100644 --- a/projects/icu/break_iterator_fuzzer.cc +++ b/projects/icu/break_iterator_fuzzer.cc @@ -37,6 +37,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { break; } if (U_FAILURE(status)) return 0; + bi->setText(str); for (int32_t p = bi->first(); p != icu::BreakIterator::DONE; p = bi->next()) if (U_FAILURE(status)) return 0; diff --git a/projects/icu/break_iterator_utf32_fuzzer.cc b/projects/icu/break_iterator_utf32_fuzzer.cc index 544e5f6d5..612c04ae6 100644 --- a/projects/icu/break_iterator_utf32_fuzzer.cc +++ b/projects/icu/break_iterator_utf32_fuzzer.cc @@ -38,6 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { } if (U_FAILURE(status)) return 0; + bi->setText(str); for (int32_t p = bi->first(); p != icu::BreakIterator::DONE; p = bi->next()) if (U_FAILURE(status))