From 890ce439b1e97092f052580e04d408cf1abfa0bf Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 26 Jul 2021 12:34:08 +0200 Subject: [PATCH] 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly Resolves: rhbz#1982118 --- ...ix-page-range-like-10-in-pdftopdf-fi.patch | 26 +++++++++++++++++++ cups-filters.spec | 7 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch diff --git a/0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch b/0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch new file mode 100644 index 0000000..1baab50 --- /dev/null +++ b/0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch @@ -0,0 +1,26 @@ +From 022c34fedb66f706b2ab82d7506d5b5b1fa18e1f Mon Sep 17 00:00:00 2001 +From: Bryan Mason +Date: Fri, 16 Jul 2021 11:19:42 -0700 +Subject: [PATCH] libcupsfilter: Fix page range like "10-" in pdftopdf() + filter function + +--- + filter/pdftopdf/pdftopdf.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/filter/pdftopdf/pdftopdf.cc b/filter/pdftopdf/pdftopdf.cc +index 5725e199..979644f1 100644 +--- a/filter/pdftopdf/pdftopdf.cc ++++ b/filter/pdftopdf/pdftopdf.cc +@@ -256,7 +256,7 @@ static void parseRanges(const char *range,IntervalSet &ret) // {{{ + } else { + upper=strtol(range,(char **)&range,10); + if (upper>=2147483647) { +- ret.add(1); ++ ret.add(lower); + } else { + ret.add(lower,upper+1); + } +-- +2.31.1 + diff --git a/cups-filters.spec b/cups-filters.spec index 92a9557..87bd218 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.28.7 -Release: 8%{?dist} +Release: 9%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -27,6 +27,8 @@ Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{versio Patch01: 0001-cups-browsed-Always-save-.-default-option-entries-fr.patch # 1973055 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt Patch02: 0001-cups-browsed.c-Make-NotifLeaseDuration-configurable-.patch +# 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly +Patch03: 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch # autogen.sh @@ -354,6 +356,9 @@ done %{_libdir}/pkgconfig/libfontembed.pc %changelog +* Mon Jul 26 2021 Zdenek Dohnal - 1.28.7-9 +- 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly + * Mon Jun 21 2021 Zdenek Dohnal - 1.28.7-8 - 1973055 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt