summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-11 14:24:35 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-11 14:24:35 -0800
commit239955073722582152d9ab190794317dd775a1c1 (patch)
tree0cd013ba7f23c9af499963d3e079bb96930ebefb
parent869517236c27b92b7060da7f44a0b01e252e8211 (diff)
downloadpdfium-239955073722582152d9ab190794317dd775a1c1.tar.xz
m_pColorSpace can not be NULL for image object with DCTDecode filter
BUG=411842 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/792113003
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index f053e559b3..1637655e68 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -504,6 +504,9 @@ FX_BOOL CPDF_DIBSource::LoadColorInfo(CPDF_Dictionary* pFormResources, CPDF_Dict
}
DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, FX_BOOL& bColorKey)
{
+ if (m_pColorSpace == NULL) {
+ return NULL;
+ }
DIB_COMP_DATA* pCompData = FX_Alloc(DIB_COMP_DATA, m_nComponents);
if (pCompData == NULL) {
return NULL;