summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2015-10-28 12:13:02 -0700
committerOliver Chang <ochang@chromium.org>2015-10-28 12:13:02 -0700
commitcd87ff7d8b402212371c18271e3c6e487d59a226 (patch)
tree55256e56aa88151280e537ad35cb090ee94c20bd /core
parentef97fc63866bd1d7cba93f6c6d9995cb4d74ca5c (diff)
downloadpdfium-cd87ff7d8b402212371c18271e3c6e487d59a226.tar.xz
Merge to XFA: Add a NULL check in pdf_page_colors.cpp
TBR=thestig@chromium.org BUG=548714 Clean merge. Review URL: https://codereview.chromium.org/1430653002 . (cherry picked from commit 55ed2880e9d19e79717063b117aa5eee40dd454b) Review URL: https://codereview.chromium.org/1428643005 .
Diffstat (limited to 'core')
-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 bed3cfbb2c..e4bb1a3d10 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -327,6 +327,9 @@ class CPDF_CalGray : public CPDF_ColorSpace {
FX_BOOL CPDF_CalGray::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++) {