diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-10-17 16:00:23 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-17 20:52:18 +0000 |
commit | 7c2daec0a5f5d5e0f442db7946e9356daa7c55b2 (patch) | |
tree | da027ac8fea5854b0bc3cda3336dbe7970e511cd /core | |
parent | 6dc4fb899acfee6261a44cde8015b5c8f3eb75a3 (diff) | |
download | pdfium-7c2daec0a5f5d5e0f442db7946e9356daa7c55b2.tar.xz |
Fix loading mutually referencing colorspaces.chromium/3243
CPDF_DeviceNCS and CPDF_SeparationCS can load other colorspaces and
their v_Load() needs to pass around a set of visited spaces to avoid
stack overflows if that other colorspace references the first one.
Bug: chromium:773095
Change-Id: Idae26c95a8034c3ded70f70e20ae1c414d7b29c3
Reviewed-on: https://pdfium-review.googlesource.com/16250
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/page/cpdf_colorspace.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp index 97a0c1584c..dd13bf5049 100644 --- a/core/fpdfapi/page/cpdf_colorspace.cpp +++ b/core/fpdfapi/page/cpdf_colorspace.cpp @@ -1091,7 +1091,7 @@ bool CPDF_SeparationCS::v_Load(CPDF_Document* pDoc, if (pAltCS == m_pArray) return false; - m_pAltCS = Load(pDoc, pAltCS); + m_pAltCS = Load(pDoc, pAltCS, pVisited); if (!m_pAltCS) return false; @@ -1169,7 +1169,7 @@ bool CPDF_DeviceNCS::v_Load(CPDF_Document* pDoc, if (!pAltCS || pAltCS == m_pArray) return false; - m_pAltCS = Load(pDoc, pAltCS); + m_pAltCS = Load(pDoc, pAltCS, pVisited); m_pFunc = CPDF_Function::Load(pArray->GetDirectObjectAt(3)); if (!m_pAltCS || !m_pFunc) return false; |