]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix get_options regression (Issue #1532)
authorMichael R Sweet <msweet@msweet.org>
Wed, 8 Apr 2026 20:42:48 +0000 (16:42 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 8 Apr 2026 20:42:53 +0000 (16:42 -0400)
scheduler/job.c
test/5.5-lp.sh

index 6b9d366415714516b8c65d19ecc6e7129b878a57..cf019e17cb9156eb1bbcf6b28cd935f5199646a2 100644 (file)
@@ -4144,7 +4144,7 @@ get_options(cupsd_job_t *job,             /* I - Job */
          case IPP_TAG_CHARSET :
          case IPP_TAG_LANGUAGE :
          case IPP_TAG_URI :
-             for (valptr = attr->values[i].string.text; *valptr;)
+             for (valptr = attr->values[i].string.text; *valptr; valptr ++)
              {
               /*
                * Convert tabs and newlines to spaces, filter out control chars,
@@ -4159,7 +4159,7 @@ get_options(cupsd_job_t *job,             /* I - Job */
                {
                  if (strchr("\\\'\"", *valptr))
                    *optptr++ = '\\';
-                 *optptr++ = *valptr++;
+                 *optptr++ = *valptr;
                }
              }
 
index 25e9d65a338922c8eda317491beac8a15748d2f1..fe60890305d6c5260d54418c18c769646bbd1500 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Test the lp command.
 #
-# Copyright © 2020-2024 by OpenPrinting.
+# Copyright © 2020-2026 by OpenPrinting.
 # Copyright © 2007-2019 by Apple Inc.
 # Copyright © 1997-2005 by Easy Software Products, all rights reserved.
 #
@@ -72,8 +72,8 @@ echo ""
 
 echo "LP Flood Test ($1 times in parallel)"
 echo ""
-echo "    lp -d Test1 testfile.jpg"
-echo "    lp -d Test2 testfile.jpg"
+echo "    lp -d Test1 -t 'Flood Test N' testfile.jpg"
+echo "    lp -d Test2 -t 'Flood Test N' testfile.jpg"
 i=0
 pids=""
 while test $i -lt $1; do
@@ -83,9 +83,9 @@ while test $i -lt $1; do
                j=`expr $j + 1`
        done
 
-       $runcups $VALGRIND ../systemv/lp -d Test1 ../examples/testfile.jpg 2>&1 &
+       $runcups $VALGRIND ../systemv/lp -d Test1 -t "Flood Test $j" ../examples/testfile.jpg 2>&1 &
        pids="$pids $!"
-       $runcups $VALGRIND ../systemv/lp -d Test2 ../examples/testfile.jpg 2>&1 &
+       $runcups $VALGRIND ../systemv/lp -d Test2 -t "Flood Test $j" ../examples/testfile.jpg 2>&1 &
        pids="$pids $!"
 
        i=`expr $i + 1`