From: Till Kamppeter Date: Tue, 2 Nov 2021 23:10:03 +0000 (+0100) Subject: Client Snap support in cupsd: Additional NULL check X-Git-Tag: v2.4rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69434b4ed1d7146bc6b5d7a4133b32b6a5527899;p=thirdparty%2Fcups.git Client Snap support in cupsd: Additional NULL check When testing the newest snapd whether it works correctly together with CUPS, I hit a segfault in the chackwhether the client is a Snap plugging cups-control, for the case when CUPS is not snapped. Fixed this with an additional NULL check. --- diff --git a/scheduler/auth.c b/scheduler/auth.c index 9988a6c55f..9c1167bde3 100644 --- a/scheduler/auth.c +++ b/scheduler/auth.c @@ -2120,7 +2120,7 @@ check_admin_access(cupsd_client_t *con) // I - Client connection cupsdLogClient(con, CUPSD_LOG_DEBUG, "Unable to get client Snap plugs: %s", error->message); ret = 0; } - else if (plugs->len <= 0) + else if (!plugs || plugs->len <= 0) { cupsdLogClient(con, CUPSD_LOG_DEBUG, "Snap without cups-control plug - denied."); ret = 0;