]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix error handling when reading a bad 1setOf attribute.
authorMichael R Sweet <msweet@msweet.org>
Fri, 14 Jun 2024 17:59:24 +0000 (13:59 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 14 Jun 2024 17:59:24 +0000 (13:59 -0400)
CHANGES.md
cups/ipp.c

index fe5016fe08faf1d76fb0ae962669283cc50631dc..cd98dd14b73cbf8b058872cc0e941acdf29007c6 100644 (file)
@@ -97,6 +97,7 @@ Changes in CUPS v2.5b1 (TBA)
 - Fixed non-quick copy of collection values.
 - Fixed TLS negotiation using OpenSSL with servers that require the TLS SNI
   extension.
+- Fixed error handling when reading a mixed `1setOf` attribute.
 - Removed hash support for SHA2-512-224 and SHA2-512-256.
 - Removed `mantohtml` script for generating html pages (use
   `https://www.msweet.org/mantohtml/`)
index bb32ade27d39a84396f3a2db75cae14d9deac66c..1c090838dd0d1c07b09bdb93fba8910082684f50 100644 (file)
@@ -2789,7 +2789,8 @@ ippReadIO(void        *src,               // I - Data source
               if (value_tag != tag)
               {
                 DEBUG_printf("1ippReadIO: Converting %s attribute from %s to %s.", attr->name, ippTagString(value_tag), ippTagString(tag));
-               ippSetValueTag(ipp, &attr, tag);
+               if (!ippSetValueTag(ipp, &attr, tag))
+                 goto rollback;
              }
             }
            else if (value_tag == IPP_TAG_INTEGER || value_tag == IPP_TAG_RANGE)