diff --git a/poppler-21.01.0-XRef-check-isDict.patch b/poppler-21.01.0-XRef-check-isDict.patch new file mode 100644 index 0000000..0f0cca5 --- /dev/null +++ b/poppler-21.01.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 f68b0cc..10bab1b 100644 --- a/poppler.spec +++ b/poppler.spec @@ -3,7 +3,7 @@ Summary: PDF rendering library Name: poppler Version: 21.01.0 -Release: 17%{?dist} +Release: 18%{?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 @@ -44,6 +44,9 @@ Patch10: poppler-21.01.0-pdfunite-check-isDict.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2189814 Patch11: poppler-21.01.0-check-isDict.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2189810 +Patch12: poppler-21.01.0-XRef-check-isDict.patch + BuildRequires: make BuildRequires: cmake BuildRequires: gcc-c++ @@ -237,6 +240,10 @@ test "$(pkg-config --modversion poppler-qt5)" = "%{version}" %{_mandir}/man1/* %changelog +* Fri Jun 9 2023 Marek Kasik - 21.01.0-18 +- Check XRef's Catalog for being a Dict +- Resolves: #2189820 + * Fri Jun 9 2023 Marek Kasik - 21.01.0-17 - Check isDict before calling getDict 2 - Resolves: #2189841