]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
cron: fix the cron_multi_set memory allocation - fixes #2273
authorJaroslav Kysela <perex@perex.cz>
Mon, 8 Sep 2014 16:04:19 +0000 (18:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 8 Sep 2014 16:04:19 +0000 (18:04 +0200)
src/cron.c

index 41850dd43fb77eae4cf0a2a2e1d76bec0ef98795..997817c63087b9654f752dbb48aab85c0bbf9482 100644 (file)
@@ -176,7 +176,7 @@ cron_multi_set ( const char *str )
     if (line[0] != '#')
       if (!cron_set(&cron, line)) {
         count++;
-        cm2 = realloc(cm, sizeof(cm) + sizeof(cron) * count);
+        cm2 = realloc(cm, sizeof(*cm) + sizeof(cron) * count);
         if (cm2 == NULL) {
           free(cm);
           return NULL;