From ebe496cd5309574df6f035f0ba49a633b2d00450 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 27 Mar 2024 20:17:12 +0000 Subject: [PATCH] import CS poppler-20.11.0-11.el8 --- ...pler-20.11.0-fix-crash-in-FoFiType1C.patch | 45 +++++++++++++++++++ SPECS/poppler.spec | 10 ++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 SOURCES/poppler-20.11.0-fix-crash-in-FoFiType1C.patch diff --git a/SOURCES/poppler-20.11.0-fix-crash-in-FoFiType1C.patch b/SOURCES/poppler-20.11.0-fix-crash-in-FoFiType1C.patch new file mode 100644 index 0000000..80f406c --- /dev/null +++ b/SOURCES/poppler-20.11.0-fix-crash-in-FoFiType1C.patch @@ -0,0 +1,45 @@ +From 3cc28b66132e66ed2dfe13a9a285ac41ac7267d5 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Wed, 23 Dec 2020 23:27:02 +0100 +Subject: [PATCH] FoFiType1C: Fix crashes with broken files + +--- + fofi/FoFiType1C.cc | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc +index 0387b0a87..4c2e9a770 100644 +--- a/fofi/FoFiType1C.cc ++++ b/fofi/FoFiType1C.cc +@@ -194,7 +194,6 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo + Type1CIndexVal val; + GooString *buf; + char buf2[256]; +- const char **enc; + bool ok; + int i; + +@@ -299,9 +298,9 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo + } else { + (*outputFunc)(outputStream, "256 array\n", 10); + (*outputFunc)(outputStream, "0 1 255 {1 index exch /.notdef put} for\n", 40); +- enc = newEncoding ? newEncoding : (const char **)encoding; ++ const char **enc = newEncoding ? newEncoding : (const char **)encoding; + for (i = 0; i < 256; ++i) { +- if (enc[i]) { ++ if (enc && enc[i]) { + buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]); + (*outputFunc)(outputStream, buf->c_str(), buf->getLength()); + delete buf; +@@ -1945,7 +1944,7 @@ bool FoFiType1C::parse() + readPrivateDict(0, 0, &privateDicts[0]); + } else { + getIndex(topDict.fdArrayOffset, &fdIdx, &parsedOk); +- if (!parsedOk) { ++ if (!parsedOk || fdIdx.len <= 0) { + return false; + } + nFDs = fdIdx.len; +-- +GitLab + diff --git a/SPECS/poppler.spec b/SPECS/poppler.spec index 599a92a..caaa10d 100644 --- a/SPECS/poppler.spec +++ b/SPECS/poppler.spec @@ -4,7 +4,7 @@ Summary: PDF rendering library Name: poppler Version: 20.11.0 -Release: 10%{?dist} +Release: 11%{?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 @@ -45,6 +45,9 @@ 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 +# https://issues.redhat.com/browse/RHEL-4255 +Patch30: poppler-20.11.0-fix-crash-in-FoFiType1C.patch + BuildRequires: cmake BuildRequires: gettext-devel BuildRequires: pkgconfig(cairo) @@ -249,6 +252,11 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}" %{_mandir}/man1/* %changelog +* Thu Oct 12 2023 Marek Kasik - 21.01.0-11 +- Fix crashes in FoFiType1C +- Rebuild for inclusion of poppler-glib-doc in CRB +- Resolves: RHEL-4255, RHEL-4273 + * Fri Jun 9 2023 Marek Kasik - 21.01.0-10 - Check XRef's Catalog for being a Dict - Resolves: #2189816