From: Michael R Sweet Date: Tue, 19 Jun 2018 01:37:27 +0000 (-0400) Subject: Fix crash when AccessLog is NULL (Issue #5309) X-Git-Tag: v2.3b6~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dcb503fa1639c08f84a89d905175b6ed938848c;p=thirdparty%2Fcups.git Fix crash when AccessLog is NULL (Issue #5309) --- diff --git a/CHANGES.md b/CHANGES.md index ce3ff1e5ab..4a31b860dd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/scheduler/log.c b/scheduler/log.c index 74790dc359..b6226201f7 100644 --- a/scheduler/log.c +++ b/scheduler/log.c @@ -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) {