[poppler] poppler/PDFDoc.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 13 22:27:33 UTC 2020


 poppler/PDFDoc.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5cdb78fde50e3dc16006070b0884dfb6b23d964c
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu May 14 00:22:33 2020 +0200

    Fix crash in PDFDoc::getSignatureFields when there's no Forms at all

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 572c77be..4b5621fc 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -613,10 +613,12 @@ static void addSignatureFieldsToVector(FormField *ff, std::vector<FormFieldSigna
 
 std::vector<FormFieldSignature*> PDFDoc::getSignatureFields()
 {
-//   const int num_pages = getNumPages();
   std::vector<FormFieldSignature*> res;
 
   const Form *f = catalog->getForm();
+  if (!f)
+      return res;
+
   const int nRootFields = f->getNumFields();
   for (int i = 0; i < nRootFields; ++i) {
     FormField *ff = f->getRootField(i);


More information about the poppler mailing list