diff options
author | Oliver Chang <ochang@chromium.org> | 2015-10-28 12:13:02 -0700 |
---|---|---|
committer | Oliver Chang <ochang@chromium.org> | 2015-10-28 12:13:02 -0700 |
commit | cd87ff7d8b402212371c18271e3c6e487d59a226 (patch) | |
tree | 55256e56aa88151280e537ad35cb090ee94c20bd /core | |
parent | ef97fc63866bd1d7cba93f6c6d9995cb4d74ca5c (diff) | |
download | pdfium-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.cpp | 3 |
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++) { |