| Index: core/src/fxcodec/jbig2/JBig2_Context.cpp
|
| diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
|
| index 2e2cf9eeee264ae06e1b8c3dc81fd3243bbe3c04..f2c44b726aeb8562d00395ecf3ef7b05d6b3f019 100644
|
| --- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
|
| +++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
|
| @@ -1127,6 +1127,11 @@ int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment* pSegment,
|
| nRet = JBIG2_ERROR_TOO_SHORT;
|
| goto failed;
|
| }
|
| + if (pHRD->HGW == 0 || pHRD->HGH == 0) {
|
| + nRet = JBIG2_ERROR_FATAL;
|
| + goto failed;
|
| + }
|
| +
|
| pHRD->HBW = ri.width;
|
| pHRD->HBH = ri.height;
|
| pHRD->HMMR = cFlags & 0x01;
|
|
|