]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
url: another fix for urlrecompose (empty auth)
authorJaroslav Kysela <perex@perex.cz>
Thu, 7 Dec 2017 14:00:20 +0000 (15:00 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 7 Dec 2017 14:01:41 +0000 (15:01 +0100)
src/url.c

index aadbee1d02b4b5c814994d25b1fa93546cfe1d49..b742b3b7ed2d2b8d7601f0a87c00c1e5dce5024a 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -59,7 +59,8 @@ urlrecompose( url_t *url )
 {
   size_t len;
   char *raw, port[16];
-  const int auth = url->user && url->pass;
+  const int auth = url->user && url->user[0] &&
+                   url->pass && url->pass[0];
 
   len = (url->scheme ? strlen(url->scheme) : 0) + 4 +
         (auth ? (strlen(url->user) + strlen(url->pass) + 2) : 0) +