From bf4598870df6b1ebd511d61d46bc55e1d814ce2d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 15 Jul 2015 16:11:10 -0700 Subject: Add a null pointer check to CPDF_CalRGB::v_Load(). BUG=492055 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1241923005 . --- core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 3 +++ 1 file changed, 3 insertions(+) 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