From 6cc8e02c78fa3b6e46f447396cda18f190f3d0d1 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 27 Oct 2012 20:34:59 +0200 Subject: [PATCH] ICAL: fix calculation of the icaltime pointer in our buffer. --- webcit/ical_subst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2