From 9f46555e0702a37287c06b07b83bb98611f0b2f0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 15 Jul 2015 16:32:06 -0700 Subject: Merge to XFA: Add a null pointer check to CPDF_CalRGB::v_Load(). BUG=492055 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1241923005 . (cherry picked from commit bf4598870df6b1ebd511d61d46bc55e1d814ce2d) Review URL: https://codereview.chromium.org/1240843002 . --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') 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 ++) { -- cgit v1.2.3