[evolution-patches] 74320, crash viewing empty multipart message




should go in 2.2/head and probably 2.0 as well.

Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3610
diff -u -p -r1.3610 ChangeLog
--- mail/ChangeLog	17 Mar 2005 19:00:00 -0000	1.3610
+++ mail/ChangeLog	5 Apr 2005 06:45:32 -0000
@@ -1,3 +1,10 @@
+2005-04-05  Not Zed  <NotZed Ximian com>
+
+	** See bug #74320
+
+	* em-format.c (em_format_part_as): if the snooped type is NULL,
+	fall back to application/octet-stream.
+
 2005-03-16  Jeffrey Stedfast  <fejj novell com>
 
 	* em-format-html.c (efh_format_headers): Don't show multiple
Index: mail/em-format.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-format.c,v
retrieving revision 1.45
diff -u -p -r1.45 em-format.c
--- mail/em-format.c	3 Dec 2004 03:38:03 -0000	1.45
+++ mail/em-format.c	5 Apr 2005 06:45:32 -0000
@@ -568,8 +568,11 @@ em_format_part_as(EMFormat *emf, CamelSt
 	g_free(basestr);
 
 	if (mime_type != NULL) {
-		if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0)
+		if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0) {
 			emf->snoop_mime_type = mime_type = em_utils_snoop_type(part);
+			if (mime_type == NULL)
+				mime_type = "application/octet-stream";
+		}
 
 		handle = em_format_find_handler(emf, mime_type);
 		if (handle == NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]