]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Fix page range like "10-" in pdftopdf() filter function
authorTill Kamppeter <till.kamppeter@gmail.com>
Tue, 17 Aug 2021 11:03:39 +0000 (13:03 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Tue, 17 Aug 2021 11:03:39 +0000 (13:03 +0200)
(manually picked from commit 022c34fedb66f706b2ab82d7506d5b5b1fa18e1f)

NEWS
filter/pdftopdf/pdftopdf.cc

diff --git a/NEWS b/NEWS
index 136b317d6c3d57bbd47365b03dd9e65394e67a42..3488416f1910addcac102da22fa20c398a491296 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ NEWS - OpenPrinting CUPS Filters v1.28.9 - 2021-06-15
 
 CHANGES IN V1.28.10
 
+       - libcupsfilters: Fixed pdftopdf filter to correctly support
+         page ranges without upper limit, like "10-" (Pull request
+         #399).
        - libcupsfilters: Use wildcard tag (IPP_TAG_ZERO) search for
          "media-type" and "media-type-supported" in the PPD
          generator (Pull request #398).
index 1a26b95212d06075cdcfcd590d6b3beb3ce7bf1a..b065eb614fe250e3423b12bc922024cb8edd9064 100644 (file)
@@ -262,7 +262,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);
           }