]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix crash when AccessLog is NULL (Issue #5309)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 19 Jun 2018 01:37:27 +0000 (21:37 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 19 Jun 2018 01:37:27 +0000 (21:37 -0400)
CHANGES.md
scheduler/log.c

index ce3ff1e5ab5384a445faa81a5f63528fb73b9c0f..4a31b860dd8089c1ee460d1cea0b3d435dd3e18d 100644 (file)
@@ -7,6 +7,8 @@ Changes in CUPS v2.3b6
 - Localization update (Issue #5339)
 - The lpadmin command would create a non-working printer in some error cases
   (Issue #5305)
+- The scheduler would crash if an empty `AccessLog` directive was specified
+  (Issue #5309)
 - The scheduler did not idle-exit on some Linux distributions (Issue #5319)
 - Fixed a regression in the changes to ippValidateAttribute (Issue #5322,
   Issue #5330)
index 74790dc35968b426a406ba81044bcc91f47051f5..b6226201f7dc5b9caea0d42e31988b818d9f2369 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * Log file routines for the CUPS scheduler.
  *
- * Copyright 2007-2017 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -1046,7 +1047,7 @@ cupsdLogRequest(cupsd_client_t *con,      /* I - Request to log */
   * Filter requests as needed...
   */
 
-  if (AccessLogLevel == CUPSD_ACCESSLOG_NONE)
+  if (AccessLogLevel == CUPSD_ACCESSLOG_NONE || !AccessLog)
     return (1);
   else if (AccessLogLevel < CUPSD_ACCESSLOG_ALL)
   {