summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-10 16:00:29 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-10 16:11:06 -0800
commit17d734e2c0d2852bbfd4e93c54f21ead6e67c12a (patch)
tree884c9ff78d8c0a046d9d7d5f79853466b2b2e60a /core/src/fpdfapi/fpdf_render
parentea02bddce0b29dd8842170856a1519f21d5e8181 (diff)
downloadpdfium-17d734e2c0d2852bbfd4e93c54f21ead6e67c12a.tar.xz
Merge to XFA: patch from CL 791223002
Lab colorspace needs to be 3 component BUG=429134 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/791223002
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp4
1 files changed, 4 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 d2910dc1ab..c5a96d67f4 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -583,6 +583,10 @@ int CPDF_DIBSource::CreateDecoder()
if (m_nComponents != comps) {
FX_Free(m_pCompData);
m_nComponents = comps;
+ if (m_Family == PDFCS_LAB && m_nComponents != 3) {
+ m_pCompData = NULL;
+ return 0;
+ }
m_pCompData = GetDecodeAndMaskArray(m_bDefaultDecode, m_bColorKey);
if (m_pCompData == NULL) {
return 0;