Skip to content

Commit

Permalink
ICU-22716 Reduce the data size to test calendar fuzzer
Browse files Browse the repository at this point in the history
Calendar fuzzer test too many operations and cause timeout
which does not suerface the real issue. Limit the test data size to 100
instead of 1000 instead.
  • Loading branch information
FrankYFTang committed Sep 5, 2024
1 parent 964bdc5 commit 4ef5832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions icu4c/source/test/fuzzer/calendar_fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const char* GetRandomCalendarType(uint8_t rnd) {

extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
uint16_t rnd;
// Set the limit for the test data to 1000 bytes to avoid timeout for a
// Set the limit for the test data to 100 bytes to avoid timeout for a
// very long list of operations.
if (size > 1000) { size = 1000; }
if (size > 100) { size = 100; }
if (size < 2*sizeof(rnd) + 1) return 0;
icu::StringPiece fuzzData(reinterpret_cast<const char *>(data), size);
// Byte 0 and 1 randomly select a TimeZone
Expand Down

0 comments on commit 4ef5832

Please sign in to comment.