summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2014-07-15 20:42:53 -0700
committerJun Fang <jun_fang@foxitsoftware.com>2014-07-15 20:42:53 -0700
commitb44bac50e1412fe34457459904b8784c489d04b6 (patch)
tree0c69ead66720b32b1c4dc25095168fe96f44ed9e /core
parentf86d7d6bd4be27a0aab69c240a6e6a51befca598 (diff)
downloadpdfium-b44bac50e1412fe34457459904b8784c489d04b6.tar.xz
Error handling for invalid component number in CPDF_ICCBasedCS::v_Load
BUG=386728 R=palmer@chromium.org Review URL: https://codereview.chromium.org/397803002
Diffstat (limited to 'core')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index 408a55301e..1cd109784d 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -582,7 +582,7 @@ FX_BOOL CPDF_ICCBasedCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
}
CPDF_Dictionary* pDict = pStream->GetDict();
m_nComponents = pDict ? pDict->GetInteger(FX_BSTRC("N")) : 0;
- if (m_nComponents < 0 || m_nComponents > (1 << 16)) {
+ if (m_nComponents <= 0 || m_nComponents > (1 << 16)) {
return FALSE;
}
CPDF_Array* pRanges = pDict->GetArray(FX_BSTRC("Range"));