Skip to content

Commit 39cfb28

Browse files
committed
Fixed the range check for job password strings.
Same bug/vulnerability as CVE-2026-39314 on CUPS. Therefore overtaken the fix, commit 928a86b1, from CUPS 2.4.x, to reject negative values.
1 parent 4afdca9 commit 39cfb28

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎ppd/ppd-generator.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,7 @@ ppdCreatePPDFromIPP2(char *buffer, // I - Filename buffer
647647
// Password/PIN printing...
648648
//
649649

650-
if ((attr = ippFindAttribute(supported, "job-password-supported",
651-
IPP_TAG_INTEGER)) != NULL)
650+
if ((attr = ippFindAttribute(supported, "job-password-supported", IPP_TAG_INTEGER)) != NULL && ippGetInteger(attr, 0) > 0)
652651
{
653652
char pattern[33]; // Password pattern
654653
int maxlen = ippGetInteger(attr, 0);

0 commit comments

Comments
 (0)