]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Range check job-password-supported.
authorMichael R Sweet <msweet@msweet.org>
Sun, 5 Apr 2026 14:44:10 +0000 (10:44 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sun, 5 Apr 2026 14:44:10 +0000 (10:44 -0400)
cups/ppd-cache.c

index a5fce7808a9c82fea603b5f2b17abb10c8e6c12b..5412e530c7a12c180e1f62ef761518a1e847513a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * PPD cache implementation for CUPS.
  *
- * Copyright © 2022-2025 by OpenPrinting.
+ * Copyright © 2022-2026 by OpenPrinting.
  * Copyright © 2010-2021 by Apple Inc.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more
@@ -3501,7 +3501,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
   * Password/PIN printing...
   */
 
-  if ((attr = ippFindAttribute(supported, "job-password-supported", IPP_TAG_INTEGER)) != NULL)
+  if ((attr = ippFindAttribute(supported, "job-password-supported", IPP_TAG_INTEGER)) != NULL && ippGetInteger(attr, 0) > 0)
   {
     char       pattern[33];            /* Password pattern */
     int                maxlen = ippGetInteger(attr, 0);