From 6aa21da8c6512110c4ecdcd7e73ed37262ca6cf9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 28 Jul 2014 12:39:06 +0200 Subject: ical.c: Parse multiple exception rules properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There can be multiple EXDATE lines per event. Parse them correctly instead of making the last line overwrite the previous ones. Reported-by: HÃ¥kan Jerning Signed-off-by: Lukas Fleischer --- src/ical.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ical.c b/src/ical.c index dda642a..38e1b33 100644 --- a/src/ical.c +++ b/src/ical.c @@ -780,7 +780,6 @@ ical_read_exdate(llist_t * exc, FILE * log, char *exstr, char *p, *q; long date; - LLIST_INIT(exc); if ((p = strchr(exstr, ':')) != NULL) { p++; while ((q = strchr(p, ',')) != NULL) { @@ -882,6 +881,7 @@ ical_read_event(FILE * fdi, FILE * log, unsigned *noevents, vevent_type = UNDEFINED; memset(&vevent, 0, sizeof vevent); + LLIST_INIT(&vevent.exc); skip_alarm = 0; while (ical_readline(fdi, buf, lstore, lineno)) { if (skip_alarm) { -- cgit v1.2.3-70-g09d2