summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_GrrdProc.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_GrrdProc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
index f5f569c04a..8622090006 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.cpp
@@ -16,10 +16,8 @@
std::unique_ptr<CJBig2_Image> CJBig2_GRRDProc::decode(
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext) {
- if (GRW == 0 || GRW > JBIG2_MAX_IMAGE_SIZE || GRH == 0 ||
- GRH > JBIG2_MAX_IMAGE_SIZE) {
+ if (!CJBig2_Image::IsValidImageSize(GRW, GRH))
return pdfium::MakeUnique<CJBig2_Image>(GRW, GRH);
- }
if (!GRTEMPLATE) {
if ((GRAT[0] == -1) && (GRAT[1] == -1) && (GRAT[2] == -1) &&