mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 15:42:14 +00:00
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:
parent
964bdc54f7
commit
4ef58328d0
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue