]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
ippLength() did not return the correct length for IPP_TAG_CONST string values.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 3 Dec 2014 12:14:20 +0000 (12:14 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 3 Dec 2014 12:14:20 +0000 (12:14 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12281 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/ipp.c

index 6aa6895c828ae613089194421d9f4d427cf6fe88..1fb6f832b1d5a48ec80de8c0beb63b881b02b9f9 100644 (file)
@@ -9,6 +9,8 @@ CHANGES IN CUPS V2.0.2
          printers.conf file after a restart (<rdar://problem/16827518>)
        - CUPS did not compile with older versions of GNU TLS (STR #4527)
        - CUPS did not compile without Avahi or mDNSResponder (STR #4523)
+       - ippLength() did not return the correct length for IPP_TAG_CONST string
+         values.
 
 
 CHANGES IN CUPS V2.0.1
index 8375ee13d6439b80863b8b3476d7f47c3b68b23d..9211ef0eef13d2329efece3a1127114696c7ca26 100644 (file)
@@ -6675,7 +6675,7 @@ ipp_length(ipp_t *ipp,                    /* I - IPP message or collection */
     DEBUG_printf(("5ipp_length: attr->name=\"%s\", attr->num_values=%d, "
                   "bytes=" CUPS_LLFMT, attr->name, attr->num_values, CUPS_LLCAST bytes));
 
-    if (attr->value_tag < IPP_TAG_EXTENSION)
+    if ((attr->value_tag & ~IPP_TAG_CUPS_CONST) < IPP_TAG_EXTENSION)
       bytes += (size_t)attr->num_values;/* Value tag for each value */
     else
       bytes += (size_t)(5 * attr->num_values);