diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-05-15 17:37:38 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-05-15 17:37:38 -0400 |
commit | cb480624d3782dd6428b38bafce64791b4ac3b98 (patch) | |
tree | 87eba87d9c6848a8651b0dbfbe5b43550e59c97e /cups | |
parent | 9914f0fe309caf7b80ecc396c903cd93c8e166ab (diff) | |
download | cups-cb480624d3782dd6428b38bafce64791b4ac3b98.tar.gz |
Fix regression in ipptool - hex support needs to be limited to a single line.
Diffstat (limited to 'cups')
-rw-r--r-- | cups/ipp-file.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/cups/ipp-file.c b/cups/ipp-file.c index 15f17d197..142316414 100644 --- a/cups/ipp-file.c +++ b/cups/ipp-file.c @@ -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); } } |