]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix cgiFormEncode error (Issue #1611)
authorMichael R Sweet <msweet@msweet.org>
Fri, 12 Jun 2026 21:00:18 +0000 (17:00 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 12 Jun 2026 21:00:18 +0000 (17:00 -0400)
cgi-bin/html.c

index 41d7b09daae18daeb389d344f151c9e45da2b8c1..ddc3464da1d9ada57c5c34c099498ac8a97677f7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * HTML support functions for CUPS.
  *
- * Copyright © 2020-2024 by OpenPrinting.
+ * Copyright © 2020-2026 by OpenPrinting.
  * Copyright © 2007-2011 by Apple Inc.
  * Copyright © 1997-2006 by Easy Software Products.
  *
@@ -86,7 +86,7 @@ cgiFormEncode(char       *dst,                /* I - Destination string */
   * Loop through the source string and copy...
   */
 
-  for (dstptr = dst; *src && dstptr < dstend;)
+  for (dstptr = dst; *src && dstptr < dstend; src ++)
   {
     switch (*src)
     {
@@ -96,7 +96,6 @@ cgiFormEncode(char       *dst,                /* I - Destination string */
          */
 
           *dstptr++ = '+';
-         src ++;
          break;
 
       case '&' :
@@ -111,7 +110,6 @@ cgiFormEncode(char       *dst,              /* I - Destination string */
            *dstptr++ = '%';
            *dstptr++ = hex[(*src & 255) >> 4];
            *dstptr++ = hex[*src & 15];
-           src ++;
          }
           break;
 
@@ -120,7 +118,7 @@ cgiFormEncode(char       *dst,              /* I - Destination string */
          * Copy other characters literally...
          */
 
-          *dstptr++ = *src++;
+          *dstptr++ = *src;
          break;
     }
   }