The cause of this issue is that there is an indirect object like '112 0 R' but no its direct object '112 0 object' in the test pdf file. Without checking the validity, it causes a null pointer when trying to get the direct object by an indirect object.
BUG=390781
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/553613003
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index b8d2125..a5c4275 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -313,9 +313,17 @@
}
else
{
- CPDF_Object* pClone = pRef->GetDirect()->Clone();
- if(!pClone)
+ CPDF_Object* pDirect = pRef->GetDirect();
+ if(!pDirect)
+ {
return 0;
+ }
+
+ CPDF_Object* pClone = pDirect->Clone();
+ if(!pClone)
+ {
+ return 0;
+ }
if(pClone->GetType() == PDFOBJ_DICTIONARY)
{