From b096bf8cfb8cdff0b44e4cecc2366d308fa479fe Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Mon, 12 Feb 2007 12:03:13 +0000 Subject: Don't crash on Outlook meeting invitations. Closes bug #404886. Patch from 2007-02-12 Kjartan Maraas * libecal/e-cal.c: (process_detached_instances): Don't crash on Outlook meeting invitations. Closes bug #404886. Patch from Patrick Ohly. svn path=/trunk/; revision=7622 --- calendar/ChangeLog | 6 ++++++ calendar/libecal/e-cal.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 1b0c912b6..ba5b9f4b5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2007-02-12 Kjartan Maraas + + * libecal/e-cal.c: (process_detached_instances): Don't crash + on Outlook meeting invitations. Closes bug #404886. Patch + from Patrick Ohly. + 2007-02-12 Patrick Ohly Fixes #363102 diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 08bd785e3..0e428cdea 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -3608,6 +3608,21 @@ process_detached_instances (GList *instances, GList *detached_instances) processed = TRUE; } else { + if (!instance_recur_id.datetime.value || + !recur_id.datetime.value) { + /* + * Prevent obvious segfault by ignoring missing + * recurrency ids. Real problem might be elsewhere, + * but anything is better than crashing... + */ + g_log (G_LOG_DOMAIN, + G_LOG_LEVEL_CRITICAL, + "UID %s: instance RECURRENCE-ID %s + detached instance RECURRENCE-ID %s: cannot compare", + uid, + i_rid, + d_rid); + continue; + } cmp = icaltime_compare (*instance_recur_id.datetime.value, *recur_id.datetime.value); if ((recur_id.type == E_CAL_COMPONENT_RANGE_THISPRIOR && cmp <= 0) || -- cgit v1.2.1