From: Wilfried Goesgens Date: Sat, 27 Oct 2012 18:34:59 +0000 (+0200) Subject: ICAL: fix calculation of the icaltime pointer in our buffer. X-Git-Tag: v8.20~204 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6cc8e02c78fa3b6e46f447396cda18f190f3d0d1 ICAL: fix calculation of the icaltime pointer in our buffer. --- diff --git a/webcit/ical_subst.c b/webcit/ical_subst.c index e48b2f990..43a10f2eb 100644 --- a/webcit/ical_subst.c +++ b/webcit/ical_subst.c @@ -167,7 +167,7 @@ int cond_ICalHaveTimeItem(StrBuf *Target, WCTemplputParams *TP) DynamicTP = (WCTemplputParams*) malloc(sizeof(WCTemplputParams) + sizeof(struct icaltimetype)); - t = (struct icaltimetype *) ((char*)DynamicTP) + sizeof(WCTemplputParams); + t = (struct icaltimetype *) &DynamicTP[1]; memset(&tt, 0, sizeof(struct icaltimetype)); switch (Kind) {