From c67f4add6dfe88fe440a172f49946234694ac211 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 14 Jun 2024 13:59:24 -0400 Subject: [PATCH] Fix error handling when reading a bad 1setOf attribute. --- CHANGES.md | 1 + cups/ipp.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fe5016fe08..cd98dd14b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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/`) diff --git a/cups/ipp.c b/cups/ipp.c index bb32ade27d..1c090838dd 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -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) -- 2.47.2