]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- Fix - allocate space for the '\0' character for tvheadend_webroot
authorBenny Morgan <benny@zuragon.com>
Sun, 30 Jun 2013 20:13:20 +0000 (22:13 +0200)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 11 Jul 2013 19:17:34 +0000 (20:17 +0100)
(cherry picked from commit 3b38a9e0128fb88f14a6e52c3fc83853e5cc03ed)

src/main.c

index 9d20edd55c9825610351ea1831b82413b1d35ee7..98f8f080f3cc0a8d16a9504e2e02e36a8b16295d 100644 (file)
@@ -556,7 +556,7 @@ main(int argc, char **argv)
     if (*tvheadend_webroot == '/')
       tmp = strdup(tvheadend_webroot);
     else {
-      tmp = malloc(strlen(tvheadend_webroot)+1);
+      tmp = malloc(strlen(tvheadend_webroot)+2);
       *tmp = '/';
       strcpy(tmp+1, tvheadend_webroot);
     }