From 4963d4c94da4c1d64db547a1963da826a319ce84 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 8 Sep 2014 18:04:19 +0200 Subject: [PATCH] cron: fix the cron_multi_set memory allocation - fixes #2273 --- src/cron.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cron.c b/src/cron.c index 41850dd4..997817c6 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;