summaryrefslogtreecommitdiff
path: root/core
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:29:04 -0800
commit0d4fdc1bbf2c23999271617413f89f059d4a71c9 (patch)
tree15c3d8cc0862398dc5356a5b850a9d88e9756b5a /core
parent9f13eb38989ca48582998ff4c71d8f5af647327b (diff)
downloadpdfium-0d4fdc1bbf2c23999271617413f89f059d4a71c9.tar.xz
Merge to XFA: patch from CL 792113003
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
Diffstat (limited to 'core')
-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;