1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly

Resolves: rhbz#1982118
This commit is contained in:
Zdenek Dohnal 2021-07-26 12:34:08 +02:00
parent 5a6faa07cc
commit 890ce439b1
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 022c34fedb66f706b2ab82d7506d5b5b1fa18e1f Mon Sep 17 00:00:00 2001
From: Bryan Mason <bmason@redhat.com>
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

View File

@ -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 <zdohnal@redhat.com> - 1.28.7-9
- 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly
* Mon Jun 21 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-8
- 1973055 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt