[evolution-patches] patch to fix #272632 (itip-formatter plugin)
- From: Vivek Jain <jvivek novell com>
- To: "evolution-patches lists ximian com" <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch to fix #272632 (itip-formatter plugin)
- Date: Wed, 27 Jul 2005 18:50:56 +0530
hi,
The attached patch fixes
http://bugzilla.gnome.org/show_bug.cgi?id=272632
I have applied the patch submitted here, added some NULL checks.
Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/ChangeLog,v
retrieving revision 1.53
diff -u -p -r1.53 ChangeLog
--- ChangeLog 20 Jul 2005 15:40:54 -0000 1.53
+++ ChangeLog 27 Jul 2005 13:22:50 -0000
@@ -1,3 +1,13 @@
+2005-07-27 Vivek Jain <jvivek novell com>
+
+ * itip-formatter.c : (update_item)
+ applied patch submitted by <tommi komulainen iki fi>
+ do not send "cid:" to get the part.
+ check part for NULL before using it.
+ (message_foreach_part): do nothing if part is NULL
+ saves crash.
+ **Fixes #272632
+
2005-07-20 Chenthill Palanisamy <pchenthill novell com>
* itip-formatter.c: (format_itip_object): Fixed a memory
Index: itip-formatter.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/itip-formatter.c,v
retrieving revision 1.46
diff -u -p -r1.46 itip-formatter.c
--- itip-formatter.c 20 Jul 2005 15:40:54 -0000 1.46
+++ itip-formatter.c 27 Jul 2005 13:22:51 -0000
@@ -666,6 +666,9 @@ message_foreach_part (CamelMimePart *par
int parts, i;
int go = TRUE;
+ if (!part)
+ return;
+
*part_list = g_slist_append (*part_list, part);
containee = camel_medium_get_content_object (CAMEL_MEDIUM (part));
@@ -738,26 +741,29 @@ update_item (FormatItipPObject *pitip, I
if (!g_ascii_strncasecmp (uri, "cid:...", 7)) {
message_foreach_part ((CamelMimePart *) msg, &parts);
-
+
for (m = parts; m; m = m->next) {
part = m->data;
-
+
/* Skip the actual message and the text/calendar part */
/* FIXME Do we need to skip anything else? */
if (part == (CamelMimePart *) msg || part == pitip->pobject.part)
continue;
-
+
new_uri = em_utils_temp_save_part (NULL, part);
g_message ("DEBUG: the uri obtained was %s\n", new_uri);
new_attachments = g_slist_append (new_attachments, new_uri);
}
-
+
g_slist_free (parts);
-
+
} else if (!g_ascii_strncasecmp (uri, "cid:", 4)) {
- part = camel_mime_message_get_part_by_content_id (msg, uri);
- new_uri = em_utils_temp_save_part (NULL, part);
- new_attachments = g_slist_append (new_attachments, new_uri);
+ part = camel_mime_message_get_part_by_content_id (msg, uri + 4);
+ if (part) {
+ new_uri = em_utils_temp_save_part (NULL, part);
+ new_attachments = g_slist_append (new_attachments, new_uri);
+ }
+
} else {
/* Preserve existing non-cid ones */
new_attachments = g_slist_append (new_attachments, g_strdup (uri));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]