From: Michael R Sweet Date: Wed, 15 May 2019 21:37:38 +0000 (-0400) Subject: Fix regression in ipptool - hex support needs to be limited to a single line. X-Git-Tag: v2.3rc1~14 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=cb480624d3782dd6428b38bafce64791b4ac3b98;p=thirdparty%2Fcups.git Fix regression in ipptool - hex support needs to be limited to a single line. --- diff --git a/cups/ipp-file.c b/cups/ipp-file.c index 15f17d1975..1423164144 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); } }