Skip to content

Commit 3d748da

Browse files
committed
Range check job-password-supported.
1 parent 826810c commit 3d748da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cups/ppd-cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* PPD cache implementation for CUPS.
33
*
4-
* Copyright © 2022-2025 by OpenPrinting.
4+
* Copyright © 2022-2026 by OpenPrinting.
55
* Copyright © 2010-2021 by Apple Inc.
66
*
77
* Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -3501,7 +3501,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
35013501
* Password/PIN printing...
35023502
*/
35033503

3504-
if ((attr = ippFindAttribute(supported, "job-password-supported", IPP_TAG_INTEGER)) != NULL)
3504+
if ((attr = ippFindAttribute(supported, "job-password-supported", IPP_TAG_INTEGER)) != NULL && ippGetInteger(attr, 0) > 0)
35053505
{
35063506
char pattern[33]; /* Password pattern */
35073507
int maxlen = ippGetInteger(attr, 0);

0 commit comments

Comments
 (0)