From 5d94e2b245584fb29a4f4ab39884f7ae382e2271 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 9 Jun 2023 16:42:17 +0200 Subject: [PATCH] Check XRef's Catalog for being a Dict Resolves: #2189816 --- poppler-20.11.0-XRef-check-isDict.patch | 21 +++++++++++++++++++++ poppler.spec | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 poppler-20.11.0-XRef-check-isDict.patch diff --git a/poppler-20.11.0-XRef-check-isDict.patch b/poppler-20.11.0-XRef-check-isDict.patch new file mode 100644 index 0000000..0f0cca5 --- /dev/null +++ b/poppler-20.11.0-XRef-check-isDict.patch @@ -0,0 +1,21 @@ +From dcd5bd8238ea448addd102ff045badd0aca1b990 Mon Sep 17 00:00:00 2001 +From: crt +Date: Wed, 27 Jul 2022 08:40:02 +0000 +Subject: pdfseparate: Check XRef's Catalog for being a Dict + + +diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc +index 351140af..c26a41c4 100644 +--- a/poppler/PDFDoc.cc ++++ b/poppler/PDFDoc.cc +@@ -886,6 +886,10 @@ int PDFDoc::savePageAs(const GooString &name, int pageNo) + + // get and mark output intents etc. + Object catObj = getXRef()->getCatalog(); ++ if (!catObj.isDict()) { ++ error(errSyntaxError, -1, "XRef's Catelog is not a dictionary"); ++ return errOpenFile; ++ } + Dict *catDict = catObj.getDict(); + Object pagesObj = catDict->lookup("Pages"); + Object afObj = catDict->lookupNF("AcroForm").copy(); diff --git a/poppler.spec b/poppler.spec index 6db4008..599a92a 100644 --- a/poppler.spec +++ b/poppler.spec @@ -4,7 +4,7 @@ Summary: PDF rendering library Name: poppler Version: 20.11.0 -Release: 9%{?dist} +Release: 10%{?dist} License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT URL: http://poppler.freedesktop.org/ Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz @@ -42,6 +42,9 @@ Patch27: poppler-20.11.0-pdfunite-check-isDict.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2189814 Patch28: poppler-20.11.0-check-isDict.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2189810 +Patch29: poppler-20.11.0-XRef-check-isDict.patch + BuildRequires: cmake BuildRequires: gettext-devel BuildRequires: pkgconfig(cairo) @@ -246,6 +249,10 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}" %{_mandir}/man1/* %changelog +* Fri Jun 9 2023 Marek Kasik - 21.01.0-10 +- Check XRef's Catalog for being a Dict +- Resolves: #2189816 + * Fri Jun 9 2023 Marek Kasik - 20.11.0-9 - Check isDict before calling getDict 2 - Resolves: #2189837