summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/xfa_codec_fuzzer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h
index 9a1230dbf9..96074fe7cf 100644
--- a/testing/libfuzzer/xfa_codec_fuzzer.h
+++ b/testing/libfuzzer/xfa_codec_fuzzer.h
@@ -39,7 +39,8 @@ class XFACodecFuzzer {
// Skipping very large images, since they will take a long time and may lead
// to OOM.
- if (decoder->GetWidth() > kXFACodecFuzzerPixelLimit / decoder->GetHeight())
+ if (decoder->GetHeight() != 0 &&
+ decoder->GetWidth() > kXFACodecFuzzerPixelLimit / decoder->GetHeight())
return 0;
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();