Here's another small fix to prevent a segfault.

Original report:
https://www.redhat.com/archives/fedora-devel-list/2006-August/msg01024.html

Tim.
*/

--- cups-1.2.2/scheduler/printers.c.x	2006-08-24 12:30:04.000000000 +0100
+++ cups-1.2.2/scheduler/printers.c	2006-08-24 12:30:49.000000000 +0100
@@ -1606,12 +1606,11 @@
             cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdSetPrinterAttrs: Unable to get printer context");
         else
           printercon = context_new(devcon);
-
-        if (context_range_get(printercon))
-          rangestr = strdup(context_range_get(printercon));
       }
 
-      if (rangestr == NULL)
+      if (printercon && context_range_get(printercon))
+	rangestr = strdup(context_range_get(printercon));
+      else
         rangestr = strdup("unknown");
 
       cupsdSetStringf(&audit_message, "[Config] printer=%s uri=%s banners set to %s %s has range %s",

Attachment: signature.asc
Description: This is a digitally signed message part

--
redhat-lspp mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-lspp

Reply via email to