summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-15 01:41:39 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-15 01:41:39 +0000
commit473b4ae489e8c6d63b087693589eda03399f60f6 (patch)
treeb445f3ced7f358fbef3e1a73ffb9d87bbc9de8ff
parent12401f7d2dab48cc01387c58636c2e93db9c738d (diff)
downloadpdfium-chromium/3432.tar.xz
Lower the limit of image dimensions for fax codecs.chromium/3432
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 <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp4
1 files changed, 2 insertions, 2 deletions
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);