]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add missing value tag test to cupsCheckDestSupported.
authorMichael R Sweet <msweet@msweet.org>
Wed, 22 Apr 2026 19:04:07 +0000 (15:04 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 22 Apr 2026 19:04:07 +0000 (15:04 -0400)
CHANGES.md
cups/dest-options.c

index 396cee34e285fa60813974486dfb5d69270496cb..e2e24f474361e02f50badb35df60b30f18398bde 100644 (file)
@@ -172,6 +172,7 @@ v2.5b1 - YYYY-MM-DD
 - Fixed A4 support in the `ippevepcl` program (Issue #1544)
 - Fixed issues with the environment variable support of CGI programs
   (Issue #1547)
+- Fixed potential crash bug in `cupsCheckDestSupported` function.
 - 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 5c8464ccc392c9562aae152b8bc4baedef43c6fc..892b5957810bed52f3554d0374c9ae36c05c0036 100644 (file)
@@ -304,7 +304,7 @@ cupsCheckDestSupported(
   * Compare values...
   */
 
-  if (!strcmp(option, "media") && !strncmp(value, "custom_", 7))
+  if (!strcmp(option, "media") && (ippGetValueTag(attr) == IPP_TAG_KEYWORD || ippGetValueTag(attr) == IPP_TAG_NAME || ippGetValueTag(attr) == IPP_TAG_NAMELANG) && !strncmp(value, "custom_", 7))
   {
    /*
     * Check range of custom media sizes...