From 771c2a1f0266331a9b9250ee391fca88dd545b66 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 6 Aug 2007 05:04:06 +0000 Subject: ** Fix for bug #460326 svn path=/trunk/; revision=33951 --- plugins/itip-formatter/ChangeLog | 7 +++++++ plugins/itip-formatter/itip-formatter.c | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'plugins/itip-formatter') 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 + + ** 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 * 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); -- cgit v1.2.3