Index: core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp |
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp |
index 2e558ee7e87626815a34b5e320005796ca831c6f..1c56db984b31d9ac30eb29b82ad1dc1ac37b65ef 100644 |
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp |
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp |
@@ -719,6 +719,9 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template0_unopt( |
CJBig2_Image* CJBig2_GRRDProc::decode_Template0_opt( |
CJBig2_ArithDecoder* pArithDecoder, |
JBig2ArithCtx* grContext) { |
+ if (!GRREFERENCE->m_pData) |
+ return nullptr; |
+ |
FX_BOOL LTP, SLTP, bVal; |
FX_DWORD CONTEXT; |
FX_DWORD line1, line1_r, line2_r, line3_r; |
@@ -953,6 +956,9 @@ CJBig2_Image* CJBig2_GRRDProc::decode_Template1_unopt( |
CJBig2_Image* CJBig2_GRRDProc::decode_Template1_opt( |
CJBig2_ArithDecoder* pArithDecoder, |
JBig2ArithCtx* grContext) { |
+ if (!GRREFERENCE->m_pData) |
+ return nullptr; |
+ |
FX_BOOL LTP, SLTP, bVal; |
FX_DWORD CONTEXT; |
FX_DWORD line1, line1_r, line2_r, line3_r; |