From 473b4ae489e8c6d63b087693589eda03399f60f6 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 15 May 2018 01:41:39 +0000 Subject: Lower the limit of image dimensions for fax codecs. Use the same limit as JBIG2 codecs. BUG=chromium:834633 Change-Id: I11d12c841e10ab48fd85df792bf8a034fe40493c Reviewed-on: https://pdfium-review.googlesource.com/32514 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fxcodec/codec/fx_codec_fax.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp index 9739101fec..8c4b215a1b 100644 --- a/core/fxcodec/codec/fx_codec_fax.cpp +++ b/core/fxcodec/codec/fx_codec_fax.cpp @@ -45,8 +45,8 @@ const uint8_t ZeroLeadPos[256] = { 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, }; -// Limit of image dimension, an arbitrary large number. -const int kMaxImageDimension = 0x01FFFF; +// Limit of image dimension. Use the same limit as the JBIG2 codecs. +const int kMaxImageDimension = 65535; int FindBit(const uint8_t* data_buf, int max_pos, int start_pos, bool bit) { ASSERT(start_pos >= 0); -- cgit v1.2.3