From 22fc3bccab3ab30a887e3c9168630d8ce90b0066 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Sat, 24 Feb 2024 14:12:25 +0100 Subject: [PATCH] Avoid passing NULL pointer to printf(3) %s OpenBSD issues syslog(3) warnings about these as they may hint at bugs: shairport-sync: vfprintf %s NULL in "metadata socket address is "%s" port %d." Metadata listener socket is empty by default so use the existing `strnull`. --- shairport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shairport.c b/shairport.c index bded4165..e5b67969 100644 --- a/shairport.c +++ b/shairport.c @@ -2491,7 +2491,7 @@ int main(int argc, char **argv) { #ifdef CONFIG_METADATA debug(1, "metadata enabled is %d.", config.metadata_enabled); debug(1, "metadata pipename is \"%s\".", config.metadata_pipename); - debug(1, "metadata socket address is \"%s\" port %d.", config.metadata_sockaddr, + debug(1, "metadata socket address is \"%s\" port %d.", strnull(config.metadata_sockaddr), config.metadata_sockport); debug(1, "metadata socket packet size is \"%d\".", config.metadata_sockmsglength); debug(1, "get-coverart is %d.", config.get_coverart); -- 2.47.2