aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter/itip-formatter.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-06 13:04:06 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-06 13:04:06 +0800
commit771c2a1f0266331a9b9250ee391fca88dd545b66 (patch)
tree50272f4af75558b37f50f95ed98b58480809d337 /plugins/itip-formatter/itip-formatter.c
parent7bea13fa412f69f5923e9d3835769302f466bc9b (diff)
downloadgsoc2013-evolution-771c2a1f0266331a9b9250ee391fca88dd545b66.tar.gz
gsoc2013-evolution-771c2a1f0266331a9b9250ee391fca88dd545b66.tar.zst
gsoc2013-evolution-771c2a1f0266331a9b9250ee391fca88dd545b66.zip
** Fix for bug #460326
svn path=/trunk/; revision=33951
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r--plugins/itip-formatter/itip-formatter.c9
1 files changed, 9 insertions, 0 deletions
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);