From: Jaroslav Kysela Date: Mon, 8 Sep 2014 16:04:19 +0000 (+0200) Subject: cron: fix the cron_multi_set memory allocation - fixes #2273 X-Git-Tag: v4.1~1428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4963d4c94da4c1d64db547a1963da826a319ce84;p=thirdparty%2Ftvheadend.git cron: fix the cron_multi_set memory allocation - fixes #2273 --- diff --git a/src/cron.c b/src/cron.c index 41850dd43..997817c63 100644 --- a/src/cron.c +++ b/src/cron.c @@ -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;