]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix regression in ipptool - hex support needs to be limited to a single line.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 15 May 2019 21:37:38 +0000 (17:37 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 15 May 2019 21:37:38 +0000 (17:37 -0400)
cups/ipp-file.c

index 15f17d19755682ed6c47290e52343d82c47281ae..142316414493e04d74c6b2cfa49e568f35b19d1b 100644 (file)
@@ -297,7 +297,7 @@ _ippFileReadToken(_ipp_file_t *f,   /* I - File to read from */
       DEBUG_printf(("1_ippFileReadToken: Returning \"%s\" before whitespace.", token));
       return (1);
     }
-    else if (!quote && (ch == '\'' || ch == '\"' || ch == '<'))
+    else if (!quote && (ch == '\'' || ch == '\"'))
     {
      /*
       * Start of quoted text or regular expression...
@@ -385,26 +385,23 @@ _ippFileReadToken(_ipp_file_t *f, /* I - File to read from */
          ch = '\v';
       }
 
-      if (quote != '>' || !isspace(ch & 255))
+      if (tokptr < tokend)
       {
-       if (tokptr < tokend)
-       {
-        /*
-         * Add to current token...
-         */
+       /*
+       * Add to current token...
+       */
 
-         *tokptr++ = (char)ch;
-       }
-       else
-       {
-        /*
-         * Token too long...
-         */
+       *tokptr++ = (char)ch;
+      }
+      else
+      {
+       /*
+       * Token too long...
+       */
 
-         *tokptr = '\0';
-         DEBUG_printf(("1_ippFileReadToken: Too long: \"%s\".", token));
-         return (0);
-       }
+       *tokptr = '\0';
+       DEBUG_printf(("1_ippFileReadToken: Too long: \"%s\".", token));
+       return (0);
       }
     }