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.
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;