aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-11-26 18:13:23 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-11-26 18:13:23 +0600
commit22fb49fa90241abfaf5ac81de462f4b2c274f7d0 (patch)
treea8139d2ec3c8ed701145b6ea8594be3c992edc08
parent957d187ae4d2f860b133b49451b2e983fb275c1a (diff)
downloadmpd-22fb49fa90241abfaf5ac81de462f4b2c274f7d0.tar.gz
mpd-22fb49fa90241abfaf5ac81de462f4b2c274f7d0.tar.xz
mpd-22fb49fa90241abfaf5ac81de462f4b2c274f7d0.zip
HttpdOutputPlugin.cxx: fix null pointer dereference
-rw-r--r--src/output/HttpdOutputPlugin.cxx3
1 files changed, 2 insertions, 1 deletions
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);