summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-07-15 16:11:10 -0700
committerLei Zhang <thestig@chromium.org>2015-07-15 16:11:10 -0700
commitbf4598870df6b1ebd511d61d46bc55e1d814ce2d (patch)
tree676d2aa7d146a04e669f4134dc3ecd9ac3e7546e /core/src/fpdfapi
parente3db14f4d0e11ed30bd7e014ffa8cea9d6fb93ad (diff)
downloadpdfium-bf4598870df6b1ebd511d61d46bc55e1d814ce2d.tar.xz
Add a null pointer check to CPDF_CalRGB::v_Load().
BUG=492055 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1241923005 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index 9e6ca67041..101a197968 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -348,6 +348,9 @@ public:
FX_BOOL CPDF_CalRGB::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
{
CPDF_Dictionary* pDict = pArray->GetDict(1);
+ if (!pDict)
+ return FALSE;
+
CPDF_Array* pParam = pDict->GetArray(FX_BSTRC("WhitePoint"));
int i;
for (i = 0; i < 3; i ++) {