diff options
author | Lei Zhang <thestig@chromium.org> | 2015-07-15 16:11:10 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-07-15 16:11:10 -0700 |
commit | bf4598870df6b1ebd511d61d46bc55e1d814ce2d (patch) | |
tree | 676d2aa7d146a04e669f4134dc3ecd9ac3e7546e /core/src | |
parent | e3db14f4d0e11ed30bd7e014ffa8cea9d6fb93ad (diff) | |
download | pdfium-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')
-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 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 ++) { |