]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
deferred_unlink() - fix wrong allocation, fixes #2814
authorJaroslav Kysela <perex@perex.cz>
Sat, 2 May 2015 09:56:11 +0000 (11:56 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 2 May 2015 09:56:11 +0000 (11:56 +0200)
src/utils.c

index dea631e2034932c9e443f22359fa200f4b0c7ccf..4e8030d9666a97992fe80b4ee63ebbbb2a986906 100644 (file)
@@ -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);