1981603 - pdftopdf doesn't handle "page-range=10-2147483647" correctly

This commit is contained in:
Zdenek Dohnal 2021-07-20 11:27:22 +02:00
parent 84a28971d9
commit d17a3ad727
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.9
Release: 1%{?dist}
Release: 2%{?dist}
# For a breakdown of the licensing, see COPYING file
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
@ -24,6 +24,8 @@ Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{versio
# 1973056 - renew dbus notifications in the half of time
# upstream https://github.com/OpenPrinting/cups-filters/commit/d90a4fc57b00b4a1f6c196bcb96025251b555dd9
Patch01: 0001-cups-browsed.c-Make-NotifLeaseDuration-configurable-.patch
# 1981603 - pdftopdf doesn't handle "page-range=10-2147483647" correctly
Patch02: 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch
# autogen.sh
@ -351,6 +353,9 @@ done
%{_libdir}/pkgconfig/libfontembed.pc
%changelog
* Wed Jul 14 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.9-2
- 1981603 - pdftopdf doesn't handle "page-range=10-2147483647" correctly
* Mon Jun 21 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.9-1
- 1.28.9