]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The cupsCheckDestSupported function did not support NULL values (Issue #5031)
authorMichael Sweet <michael.r.sweet@gmail.com>
Mon, 19 Jun 2017 12:51:35 +0000 (08:51 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Mon, 19 Jun 2017 12:51:35 +0000 (08:51 -0400)
CHANGES.md
cups/dest-options.c

index dabb3f5db163fa45b96d6850a19b514c8af5df38..690afde0e267dfe38dc4ddebe25eab3a3ff4425c 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.2.4 - 2017-06-16
+CHANGES - 2.2.4 - 2017-06-19
 ============================
 
 CHANGES IN CUPS V2.2.4
@@ -24,6 +24,7 @@ CHANGES IN CUPS V2.2.4
   haven't yet been added (Issue #5006)
 - Fixed a typo in the mime.types file.
 - Fixed a bug in the Spanish web interface template (Issue #5016)
+- The cupsCheckDestSupported function did not support NULL values (Issue #5031)
 - Fixed some issues in the RPM spec file (Issue #5032)
 
 
index 4a3a03ab021730f4b2ce1b77051a50f8b68282c8..51705a50cb5e5744deec04a8443bfd9f42fb6b97 100644 (file)
@@ -73,7 +73,7 @@ cupsCheckDestSupported(
     cups_dest_t  *dest,                        /* I - Destination */
     cups_dinfo_t *dinfo,               /* I - Destination information */
     const char   *option,              /* I - Option */
-    const char   *value)               /* I - Value */
+    const char   *value)               /* I - Value or @code NULL@ */
 {
   int                  i;              /* Looping var */
   char                 temp[1024];     /* Temporary string */
@@ -96,7 +96,7 @@ cupsCheckDestSupported(
   * Range check input...
   */
 
-  if (!http || !dest || !dinfo || !option || !value)
+  if (!http || !dest || !dinfo || !option)
     return (0);
 
  /*
@@ -114,7 +114,10 @@ cupsCheckDestSupported(
   if (!attr)
     return (0);
 
- /*
+  if (!value)
+    return (1);
+
+/*
   * Compare values...
   */