summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/libecal/e-cal.c15
2 files changed, 21 insertions, 0 deletions
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 <kmaraas@gnome.org>
+
+ * 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 <patrick.ohly@gmx.de>
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) ||