Package: evolution
Version: 2.30.1.2-3
Severity: important
Tags: patch

Hi,
withouth the attached patch evolution crashes with the following backtrace when 
opening mails with vcalendar requests:

Core was generated by `evolution'.
Program terminated with signal 11, Segmentation fault.
#0  0xae7576d9 in format_itip (ep=0x87ddeb0, target=0xabc11d50) at 
itip-formatter.c:2567
2567    itip-formatter.c: No such file or directory.
        in itip-formatter.c
(gdb) bt
#0  0xae7576d9 in format_itip (ep=0x87ddeb0, target=0xabc11d50) at 
itip-formatter.c:2567
#1  0xb1c4dfe6 in plugin_lib_invoke (plugin=0x87ddeb0, name=0x886b6f0 
"format_itip", data=0xabc11d50) at e-plugin-lib.c:116
#2  0xb7635555 in e_plugin_invoke (ep=0x87ddeb0, name=0x886b6f0 "format_itip", 
data=0xabc11d50) at e-plugin.c:692
#3  0xb59bbdf0 in emfh_format_format (md=0x8ae3090, stream=0x8bf9618, 
part=0xae5780b0, info=0x86dc228) at em-format-hook.c:78
#4  0xb5ba028b in em_format_part_as (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae5780b0, mime_type=0x8c0b5a0 "text/calendar") at em-format.c:675
#5  0xb5ba03d5 in em_format_part (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae5780b0) at em-format.c:704
#6  0xb5ba1c91 in emf_multipart_alternative (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae5780b0, info=0xb5ba5800) at em-format.c:1486
#7  0xae787423 in org_gnome_prefer_plain_multipart_alternative (ep=0x87dde78, 
t=0xabc11f50) at prefer-plain.c:164
#8  0xb1c4dfe6 in plugin_lib_invoke (plugin=0x87dde78, name=0x886d578 
"org_gnome_prefer_plain_multipart_alternative", data=0xabc11f50) at 
e-plugin-lib.c:116
#9  0xb7635555 in e_plugin_invoke (ep=0x87dde78, name=0x886d578 
"org_gnome_prefer_plain_multipart_alternative", data=0xabc11f50) at 
e-plugin.c:692
#10 0xb59bbdf0 in emfh_format_format (md=0x8ae3090, stream=0x8bf9618, 
part=0xae578010, info=0x8856848) at em-format-hook.c:78
#11 0xb5ba028b in em_format_part_as (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae578010, mime_type=0xae542188 "multipart/alternative") at 
em-format.c:675
#12 0xb5ba03d5 in em_format_part (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae578010) at em-format.c:704
#13 0xb5ba0e19 in emf_multipart_mixed (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae573580, info=0xb5ba5830) at em-format.c:1435
#14 0xb5ba028b in em_format_part_as (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae573580, mime_type=0xae5836c0 "multipart/mixed") at em-format.c:675
#15 0xb5ba03d5 in em_format_part (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae573580) at em-format.c:704
#16 0xb59c0319 in efh_format_message (emf=0x8ae3090, stream=0x8bf9618, 
part=0xae573580, info=0xb59fd7f0) at em-format-html.c:2782
#17 0xb59be704 in efh_format_exec (m=0x8bf9650) at em-format-html.c:216
#18 0xb59d2fa8 in mail_msg_proxy (msg=0x8bf9650) at mail-mt.c:471
#19 0xb676e5bc in g_thread_pool_thread_proxy (data=0x85fb980) at 
/build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gthreadpool.c:315
#20 0xb676c69f in g_thread_create_proxy (data=0x8c18e00) at 
/build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gthread.c:1893
#21 0xb710f955 in start_thread (arg=0xabc12b70) at pthread_create.c:300
#22 0xb668c14e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

The patch was taken from current upstream git. Please apply.
Cheers,
 -- Guido


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.33 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages evolution depends on:
ii  dbus                    1.2.24-1         simple interprocess messaging syst
ii  debconf [debconf-2.0]   1.5.32           Debian configuration management sy
ii  evolution-common        2.30.1.2-3       architecture independent files for
ii  evolution-data-server   2.30.1-5         evolution database backend server
ii  gconf2                  2.28.1-3         GNOME configuration database syste
ii  gnome-icon-theme        2.30.3-1         GNOME Desktop icon theme
ii  libart-2.0-2            2.3.21-1         Library of functions for 2D graphi
ii  libatk1.0-0             1.30.0-1         The ATK accessibility toolkit
ii  libc6                   2.11.1-2         Embedded GNU C Library: Shared lib
ii  libcairo2               1.8.10-4         The Cairo 2D vector graphics libra
ii  libcamel1.2-14          2.30.1-5         The Evolution MIME message handlin
ii  libcanberra-gtk0        0.24-1           Gtk+ helper for playing widget eve
ii  libcanberra0            0.24-1           a simple abstract interface for pl
ii  libdbus-1-3             1.2.24-1         simple interprocess messaging syst
ii  libdbus-glib-1-2        0.86-1           simple interprocess messaging syst
ii  libebackend1.2-0        2.30.1-5         Utility library for evolution data
ii  libebook1.2-9           2.30.1-5         Client library for evolution addre
ii  libecal1.2-7            2.30.1-5         Client library for evolution calen
ii  libedataserver1.2-13    2.30.1-5         Utility library for evolution data
ii  libedataserverui1.2-8   2.30.1-5         GUI utility library for evolution 
ii  libegroupwise1.2-13     2.30.1-5         Client library for accessing group
ii  libenchant1c2a          1.4.2-3.6        a wrapper library for various spel
ii  libevolution            2.30.1.2-3       evolution libraries
ii  libfontconfig1          2.8.0-2.1        generic font configuration library
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  libgconf2-4             2.28.1-3         GNOME configuration database syste
ii  libgdata-google1.2-1    2.30.1-5         Client library for accessing Googl
ii  libgdata1.2-1           2.30.1-5         Client library for accessing Googl
ii  libglib2.0-0            2.24.1-1         The GLib library of C routines
ii  libgnome-desktop-2-17   2.30.0-2         Utility library for loading .deskt
ii  libgnomecanvas2-0       2.30.1-1         A powerful object-oriented display
ii  libgtk2.0-0             2.20.1-1         The GTK+ graphical user interface 
ii  libgtkhtml-editor0      3.30.1-2         HTML rendering/editing library - e
ii  libgtkhtml3.14-19       3.30.1-2         HTML rendering/editing library - r
ii  libgweather1            2.30.0-2         GWeather shared library
ii  libical0                0.44-3           iCalendar library implementation i
ii  libice6                 2:1.0.6-1        X11 Inter-Client Exchange library
ii  libnotify1 [libnotify1- 0.4.5-1          sends desktop notifications to a n
ii  libnspr4-0d             4.8.4-1          NetScape Portable Runtime Library
ii  libnss3-1d              3.12.6-2         Network Security Service libraries
ii  libpango1.0-0           1.28.0-1         Layout and rendering of internatio
ii  libsm6                  2:1.1.1-1        X11 Session Management library
ii  libsoup2.4-1            2.30.1-1         an HTTP library implementation in 
ii  libsqlite3-0            3.6.23.1-4       SQLite 3 shared library
ii  libstartup-notification 0.10-1           library for program launch feedbac
ii  libunique-1.0-0         1.1.6-1          Library for writing single instanc
ii  libxml2                 2.7.7.dfsg-2     GNOME XML library
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages evolution recommends:
pn  bogofilter | spamassassi <none>          (no description available)
ii  evolution-plugins        2.30.1.2-3      standard plugins for Evolution
ii  evolution-webcal         2.28.0-1+b1     webcal: URL handler for GNOME and 
ii  gnome-desktop-data       2.30.0-2        Common files for GNOME desktop app
ii  yelp                     2.30.1+webkit-1 Help browser for GNOME

Versions of packages evolution suggests:
pn  bug-buddy                     <none>     (no description available)
ii  evolution-dbg                 2.30.1.2-3 debugging symbols for Evolution
pn  evolution-exchange            <none>     (no description available)
ii  evolution-plugins-experimenta 2.30.1.2-3 experimental plugins for Evolution
ii  gnupg                         1.4.10-4   GNU privacy guard - a free PGP rep
ii  network-manager               0.8-1      network management framework daemo

-- debconf information:
  evolution/needs_shutdown:
>From 30a7393975b8fc8e35d3e2b30e7711ed7e33dd31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Sat, 5 Jun 2010 11:14:00 +0200
Subject: [PATCH] Fix segfault during ITIP parsing.

Fixes possible NULL pointer dereference. Patch adjusts code to current
evolution git.
---
 plugins/itip-formatter/itip-formatter.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 526af07..cf37693 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -2535,7 +2535,8 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
 	gchar *classid;
 	struct _itip_puri *puri;
 	CamelDataWrapper *content;
-	CamelStream *mem;
+	CamelStream *stream;
+	GByteArray *byte_array;
 
 	classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
 
@@ -2561,14 +2562,18 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
 
 	/* This is non-gui thread. Download the part for using in the main thread */
 	content = camel_medium_get_content_object ((CamelMedium *) target->part);
-	mem = camel_stream_mem_new ();
-	camel_data_wrapper_decode_to_stream (content, mem);
 
-	if (((CamelStreamMem *) mem)->buffer->len == 0)
+	byte_array = g_byte_array_new ();
+	stream = camel_stream_mem_new_with_byte_array (byte_array);
+	camel_data_wrapper_decode_to_stream (content, stream);
+
+	if (byte_array->len == 0)
 		puri->vcalendar = NULL;
 	else
-		puri->vcalendar = g_strndup ((gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
-	camel_object_unref (mem);
+		puri->vcalendar = g_strndup (
+			(gchar *) byte_array->data, byte_array->len);
+
+	g_object_unref (stream);
 
 	camel_stream_printf (target->stream, "<table border=0 width=\"100%%\" cellpadding=3><tr>");
 	camel_stream_printf (target->stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", classid);
-- 
1.7.1

Reply via email to