summaryrefslogtreecommitdiff
path: root/app-text/poppler/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /app-text/poppler/files
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'app-text/poppler/files')
-rw-r--r--app-text/poppler/files/poppler-0.88.0-pdfsig-crash.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/app-text/poppler/files/poppler-0.88.0-pdfsig-crash.patch b/app-text/poppler/files/poppler-0.88.0-pdfsig-crash.patch
new file mode 100644
index 000000000000..4f29727b6fcf
--- /dev/null
+++ b/app-text/poppler/files/poppler-0.88.0-pdfsig-crash.patch
@@ -0,0 +1,30 @@
+From 5cdb78fde50e3dc16006070b0884dfb6b23d964c Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Thu, 14 May 2020 00:22:33 +0200
+Subject: [PATCH] Fix crash in PDFDoc::getSignatureFields when there's no Forms
+ at all
+
+---
+ poppler/PDFDoc.cc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+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);
+--
+2.26.2