summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/jbig2/JBig2_TrdProc.cpp7
-rw-r--r--core/fxcodec/jbig2/JBig2_TrdProc.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
index 5b0ef19505..177db9dec9 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
@@ -324,11 +324,14 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
pIARDX->decode(pArithDecoder, &RDXI);
pIARDY->decode(pArithDecoder, &RDYI);
CJBig2_Image* IBOI = SBSYMS[IDI];
+ if (!IBOI)
+ return nullptr;
+
uint32_t WOI = IBOI->m_nWidth;
uint32_t HOI = IBOI->m_nHeight;
- if ((int)(WOI + RDWI) < 0 || (int)(HOI + RDHI) < 0) {
+ if ((int)(WOI + RDWI) < 0 || (int)(HOI + RDHI) < 0)
return nullptr;
- }
+
std::unique_ptr<CJBig2_GRRDProc> pGRRD(new CJBig2_GRRDProc());
pGRRD->GRW = WOI + RDWI;
pGRRD->GRH = HOI + RDHI;
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.h b/core/fxcodec/jbig2/JBig2_TrdProc.h
index fdad75fb6e..83e43ec05f 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.h
@@ -47,7 +47,6 @@ class CJBig2_TRDProc {
JBig2ArithCtx* grContext,
JBig2IntDecoderState* pIDS);
- public:
FX_BOOL SBHUFF;
FX_BOOL SBREFINE;
uint32_t SBW;