Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp

Issue 1240843002: Merge to XFA: Add a null pointer check to CPDF_CalRGB::v_Load(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index 9e6ca67041e1883981eb66447069c550c8c60a4b..101a1979680b95e37b24fb12c5eb428f140854b4 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 ++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698