From: Benny Morgan Date: Sun, 30 Jun 2013 20:13:20 +0000 (+0200) Subject: - Fix - allocate space for the '\0' character for tvheadend_webroot X-Git-Tag: 3.4patch1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb9a8f0342b5d33cf672376c84eddd10b016229;p=thirdparty%2Ftvheadend.git - Fix - allocate space for the '\0' character for tvheadend_webroot (cherry picked from commit 3b38a9e0128fb88f14a6e52c3fc83853e5cc03ed) --- diff --git a/src/main.c b/src/main.c index 9d20edd55..98f8f080f 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); }