From: Michael R Sweet Date: Wed, 10 Apr 2024 20:26:38 +0000 (-0400) Subject: Fix crash when host is NULL. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87535c34923d8ec608f3cdf3aff9e311feac2961;p=thirdparty%2Fcups.git Fix crash when host is NULL. --- diff --git a/cups/dnssd.c b/cups/dnssd.c index 58c50fc056..c097f83786 100644 --- a/cups/dnssd.c +++ b/cups/dnssd.c @@ -1082,7 +1082,7 @@ cupsDNSSDServiceAdd( // Avahi has trouble with hostnames for services that are only available on // the loopback interface/localhost... - if (service->if_index == CUPS_DNSSD_IF_INDEX_LOCAL || !_cups_strcasecmp(host, "localhost")) + if (service->if_index == CUPS_DNSSD_IF_INDEX_LOCAL || (host && !_cups_strcasecmp(host, "localhost"))) host = NULL; // Build the string list from the TXT array...