From 1fc3c3b309d96b4e4f4c6d8b270a4e72710ca4a1 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 30 Oct 2017 14:06:12 +0000 Subject: Fix overflow in image size check BUG=chromium:779342 Change-Id: I2a087a08fe87594eb73d9d955955be0e66e5cdc2 Reviewed-on: https://pdfium-review.googlesource.com/17030 Commit-Queue: dsinclair Reviewed-by: dsinclair --- testing/libfuzzer/xfa_codec_fuzzer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/libfuzzer/xfa_codec_fuzzer.h b/testing/libfuzzer/xfa_codec_fuzzer.h index e91ea20577..9a1230dbf9 100644 --- a/testing/libfuzzer/xfa_codec_fuzzer.h +++ b/testing/libfuzzer/xfa_codec_fuzzer.h @@ -39,7 +39,7 @@ class XFACodecFuzzer { // Skipping very large images, since they will take a long time and may lead // to OOM. - if (decoder->GetWidth() * decoder->GetHeight() > kXFACodecFuzzerPixelLimit) + if (decoder->GetWidth() > kXFACodecFuzzerPixelLimit / decoder->GetHeight()) return 0; auto bitmap = pdfium::MakeRetain(); -- cgit v1.2.3