diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-14 17:22:13 -0800 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-14 17:22:13 -0800 |
commit | 0c32f02cf5dabd80c03f3af34874b5f84535b1ef (patch) | |
tree | 98a8306a1e87ffaabcab4beba46c011b29a2357f /xfa/src/fxfa | |
parent | a197ba486d3b9a87956477ed867a3ebf8ee74f56 (diff) | |
download | pdfium-0c32f02cf5dabd80c03f3af34874b5f84535b1ef.tar.xz |
Check NULL pointer dereferencing from GetDirect
BUG=431770
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/728993002
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffdoc.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp index 9c686036c0..625a34db4b 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp @@ -233,15 +233,11 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) if (pAcroForm == NULL) {
return FALSE;
}
- CPDF_Object* pElementXFA = pAcroForm->GetElement(FX_BSTRC("XFA"));
+ CPDF_Object* pElementXFA = pAcroForm->GetElementValue(FX_BSTRC("XFA"));
if (pElementXFA == NULL) {
return FALSE;
}
FX_INT32 iObjType = pElementXFA->GetType();
- if (iObjType == PDFOBJ_REFERENCE) {
- pElementXFA = pElementXFA->GetDirect();
- iObjType = pElementXFA->GetType();
- }
CFX_ArrayTemplate<CPDF_Stream*> xfaStreams;
if (iObjType == PDFOBJ_ARRAY) {
CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA;
|