ICU-22716 Reduce the data size to test calendar fuzzer

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.
This commit is contained in:
Frank Tang 2024-09-04 15:37:51 -07:00 committed by Frank Yung-Fong Tang
parent 964bdc54f7
commit 4ef58328d0

View file

@ -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