]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The `ippCopyAttribute` function did not copy out-of-band values correctly
authorMichael Sweet <michael.r.sweet@gmail.com>
Wed, 2 Aug 2017 23:53:50 +0000 (19:53 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Wed, 2 Aug 2017 23:53:50 +0000 (19:53 -0400)
(rdar://33688003)

CHANGES.md
cups/ipp.c

index be246c4830cae301101404d6ab23811290ea912c..ad406c9c059c928dde8857e415a6a8fe3f9c1dd0 100644 (file)
@@ -36,6 +36,8 @@ CHANGES IN CUPS V2.2.5
   printers (rdar://33250434)
 - Fixed the `cups.strings` file that is used on macOS (rdar://33287650)
 - CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034)
+- The `ippCopyAttribute` function did not copy out-of-band values correctly
+  (rdar://33688003)
 
 
 CHANGES IN CUPS V2.2.4
index 429a05eafe03e618691b93988a0ef441de135eb6..5fd58704086c3c63099b1b56b66414d8d91ec704 100644 (file)
@@ -1509,6 +1509,16 @@ ippCopyAttribute(
         dstattr = ippAddSeparator(dst);
        break;
 
+    case IPP_TAG_UNSUPPORTED_VALUE :
+    case IPP_TAG_DEFAULT :
+    case IPP_TAG_UNKNOWN :
+    case IPP_TAG_NOVALUE :
+    case IPP_TAG_NOTSETTABLE :
+    case IPP_TAG_DELETEATTR :
+    case IPP_TAG_ADMINDEFINE :
+        dstattr = ippAddOutOfBand(dst, srcattr->group_tag, srcattr->value_tag & ~IPP_TAG_CUPS_CONST, srcattr->name);
+        break;
+
     case IPP_TAG_INTEGER :
     case IPP_TAG_ENUM :
         dstattr = ippAddIntegers(dst, srcattr->group_tag, srcattr->value_tag,