Skip to content

Commit 5539b2d

Browse files
committed
Add missing value tag test to cupsCheckDestSupported.
1 parent c9e70b2 commit 5539b2d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ v3.0.2 - YYYY-MM-DD
1111
- Fixed exporting of JSON with very large numbers.
1212
- Fixed page header validation in `cupsRasterReadHeader` and
1313
`cupsRasterWriteHeader` for banded raster data.
14+
- Fixed potential crash bug in `cupsCheckDestSupported` function.
1415

1516

1617
v3.0.1 - 2026-04-09

cups/dest-options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ cupsCheckDestSupported(
181181
return (true);
182182

183183
// Compare values...
184-
if (!strcmp(option, "media") && !strncmp(value, "custom_", 7))
184+
if (!strcmp(option, "media") && (ippGetValueTag(attr) == IPP_TAG_KEYWORD || ippGetValueTag(attr) == IPP_TAG_NAME || ippGetValueTag(attr) == IPP_TAG_NAMELANG) && !strncmp(value, "custom_", 7))
185185
{
186186
// Check range of custom media sizes...
187187
pwg_media_t *pwg; // Current PWG media size info

0 commit comments

Comments
 (0)