From 6fb9a8f0342b5d33cf672376c84eddd10b016229 Mon Sep 17 00:00:00 2001 From: Benny Morgan Date: Sun, 30 Jun 2013 22:13:20 +0200 Subject: [PATCH] - Fix - allocate space for the '\0' character for tvheadend_webroot (cherry picked from commit 3b38a9e0128fb88f14a6e52c3fc83853e5cc03ed) --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 9d20edd5..98f8f080 100644 --- a/src/main.c +++ b/src/main.c @@ -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); }