summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-02-11 19:50:55 +0100
committerLars-Dominik Braun <lars@6xq.net>2016-02-11 19:53:55 +0100
commitbdc9dc727b0464bc17bed002d2a701cfc34b777a (patch)
treed6c597c119b94e1c8641224a754c970a85788f0d /src/ui.c
parent7235a62c183d3815a0fc3dd7e05c6a3492a23f1f (diff)
downloadpianobar-bdc9dc727b0464bc17bed002d2a701cfc34b777a.tar.gz
pianobar-bdc9dc727b0464bc17bed002d2a701cfc34b777a.tar.bz2
pianobar-bdc9dc727b0464bc17bed002d2a701cfc34b777a.zip
Add default value for rpcTlsPort
Passing NULL to printf and the result to curl may or may not work. YMMV. Fixes #574.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui.c b/src/ui.c
index 92a91c2..c2a55df 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -178,7 +178,11 @@ static CURLcode BarPianoHttpRequest (CURL * const http,
const BarSettings_t * const settings, PianoRequest_t * const req) {
buffer buffer = {NULL, 0};
sig_atomic_t lint = 0, *prevint;
+
char url[2048];
+ assert (settings->rpcHost != NULL);
+ assert (settings->rpcTlsPort != NULL);
+ assert (req->urlPath != NULL);
int ret = snprintf (url, sizeof (url), "%s://%s:%s%s",
req->secure ? "https" : "http",
settings->rpcHost,