diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2015-01-13 17:02:12 -0800 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2015-01-13 17:02:12 -0800 |
commit | 9f78c2af6ec544657136a84b94bb93e4777f9f3c (patch) | |
tree | f77ef77acdcc8d95333878bdbe3c95a2edcded22 /fpdfsdk/src | |
parent | 04ddadebc55ac0e6596a1b54c0d38f828c6162a4 (diff) | |
download | pdfium-9f78c2af6ec544657136a84b94bb93e4777f9f3c.tar.xz |
Fix a NULL dereference introduced from https://pdfium.googlesource.com/pdfium/+/5d9acf8ee5dbbaad838f14f1fa173d892c4300ab%5E%21
The test file is test/barcode_test.pdf
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/851713004
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/fpdfdoc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp index 26c3946de6..f2a190bc67 100644 --- a/fpdfsdk/src/fpdfdoc.cpp +++ b/fpdfsdk/src/fpdfdoc.cpp @@ -137,6 +137,8 @@ DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, do if (!page) return NULL; CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); + if (!pPage) + return NULL; // Link list is stored with the document CPDF_Document* pDoc = pPage->m_pDocument; CPDF_LinkList* pLinkList = (CPDF_LinkList*)pDoc->GetPrivateData(&THISMODULE); |