From 22fb49fa90241abfaf5ac81de462f4b2c274f7d0 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Tue, 26 Nov 2013 18:13:23 +0600 Subject: [PATCH] HttpdOutputPlugin.cxx: fix null pointer dereference --- src/output/HttpdOutputPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/HttpdOutputPlugin.cxx b/src/output/HttpdOutputPlugin.cxx index 369c06937..1d80011dd 100644 --- a/src/output/HttpdOutputPlugin.cxx +++ b/src/output/HttpdOutputPlugin.cxx @@ -201,7 +201,8 @@ HttpdOutput::OnAccept(int fd, const sockaddr &address, if (address.sa_family != AF_UNIX) { char *hostaddr = sockaddr_to_string(&address, address_length, IgnoreError()); - const char *progname = g_get_prgname(); + // TODO: shall we obtain the program name from argv[0]? + const char *progname = "mpd"; struct request_info req; request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);