From b696781f03b33fca3604d03183dbad89cb3b9273 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 29 Oct 2016 15:35:37 +0100 Subject: crashtesting: piles of pdf import crashes e.g. ooo112863-2.pdf Change-Id: I359f7e50f416f0a756e16099cdf47be3b1c32d90 --- xmlsecurity/source/pdfio/pdfdocument.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 4d6cbd4fd9b7..2125749863df 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -1427,6 +1427,9 @@ std::vector PDFDocument::GetSignatureWidgets() for (const auto& pPage : aPages) { + if (!pPage) + continue; + PDFElement* pAnnotsElement = pPage->Lookup("Annots"); auto pAnnots = dynamic_cast(pAnnotsElement); if (!pAnnots) -- cgit