Limit input size in pdf_fx_date_helpers_fuzzer. Longer inputs are unlikely to find anything but will cause timeouts in debug builds. Bug: chromium:947780 Change-Id: I811d6f70ff38c38a1385a7ff4ff1bed0775ba706 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/52730 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/fuzzers/pdf_fx_date_helpers_fuzzer.cc b/testing/fuzzers/pdf_fx_date_helpers_fuzzer.cc index ff81c47..e31decc 100644 --- a/testing/fuzzers/pdf_fx_date_helpers_fuzzer.cc +++ b/testing/fuzzers/pdf_fx_date_helpers_fuzzer.cc
@@ -10,7 +10,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { auto* short_data = reinterpret_cast<const unsigned short*>(data); size_t short_size = size / sizeof(unsigned short); - if (short_size > 2) { + if (short_size > 2 && short_size < 8192) { double ignore; size_t short_len1 = short_size / 2; size_t short_len2 = short_size - short_len1;