]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Support C-style character escapes in IPP files.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 3 May 2019 18:35:04 +0000 (14:35 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 3 May 2019 18:35:04 +0000 (14:35 -0400)
cups/ipp-file.c

index a0b2bb0c3887f62b502a83da400dc93b6da4eb1d..0bba21d518c67b7bad5b9011f1128f49cab33729 100644 (file)
@@ -366,6 +366,20 @@ _ippFileReadToken(_ipp_file_t *f,  /* I - File to read from */
          f->linenum ++;
          DEBUG_printf(("1_ippFileReadToken: quoted LF, linenum=%d, pos=%ld", f->linenum, (long)cupsFileTell(f->fp)));
        }
+       else if (ch == 'a')
+         ch = '\a';
+       else if (ch == 'b')
+         ch = '\b';
+       else if (ch == 'f')
+         ch = '\f';
+       else if (ch == 'n')
+         ch = '\n';
+       else if (ch == 'r')
+         ch = '\r';
+       else if (ch == 't')
+         ch = '\t';
+       else if (ch == 'v')
+         ch = '\v';
       }
 
       if (tokptr < tokend)