aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/itip-formatter/ChangeLog7
-rw-r--r--plugins/itip-formatter/itip-formatter.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index 8e2e2e3aef..5394bc2148 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-06 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #460326
+
+ * itip-formatter.c: (extract_itip_data): If the vcalendar isn't there
+ don't crash but report invalid.
+
2007-07-20 Claude Paroz <claude@2xlibre.net>
* itip-view.c: (set_tasklist_sender_text): Added omitted %s formatter.
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 420fe6006f..6e85300a3d 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -1339,6 +1339,15 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
mem = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (content, mem);
+ if (((CamelStreamMem *) mem)->buffer->len == 0) {
+ camel_object_unref (mem);
+ set_itip_error (pitip, container,
+ _("The calendar attached is not valid"),
+ _("The message claims to contain a calendar, but the calendar is not a valid iCalendar."));
+
+ return FALSE;
+ }
+
pitip->vcalendar = g_strndup ((char *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
camel_object_unref (mem);