From: Jaroslav Kysela Date: Sat, 2 May 2015 09:56:11 +0000 (+0200) Subject: deferred_unlink() - fix wrong allocation, fixes #2814 X-Git-Tag: v4.1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41bb5cdd997bc3011c0ba65ec5a4b93c4c2c5a4c;p=thirdparty%2Ftvheadend.git deferred_unlink() - fix wrong allocation, fixes #2814 --- diff --git a/src/utils.c b/src/utils.c index dea631e20..4e8030d96 100644 --- a/src/utils.c +++ b/src/utils.c @@ -661,7 +661,7 @@ deferred_unlink(const char *filename) int r; l = strlen(filename); - s = malloc(l + 9); + s = malloc(l + 9 + 1); if (s == NULL) return -ENOMEM; strcpy(s, filename);