[evolution-patches] [calendar-gw] fix for 314925



hi

 The attached patch removes a memory
 corruption issue causing occasionally
 to see the malformed attendees in attendee
 tab of meeting dialog. 
 Fixes 314925.

regards.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.511
diff -u -p -w -r1.511 ChangeLog
--- ChangeLog	2 Sep 2005 18:43:18 -0000	1.511
+++ ChangeLog	8 Sep 2005 10:19:41 -0000
@@ -1,3 +1,14 @@
+2005-09-02  P. S. Chakravarthi <pchakravarthi novell com>
+
+	Fixes #314925
+	* libecal/e-cal-component.c:
+	(get_attendee_list): The function previously returned
+	some internal pointers of the calendar component for
+	making an attendee list which cause memory corruption
+	when used along with set_attendee_list() and/or
+	e_cal_component_free_attendee_list().
+	Code is modified to give copies of the fields.
+
 2005-09-01  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #114384
Index: libecal/e-cal-component.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-component.c,v
retrieving revision 1.18
diff -u -p -w -r1.18 e-cal-component.c
--- libecal/e-cal-component.c	31 Aug 2005 04:21:54 -0000	1.18
+++ libecal/e-cal-component.c	8 Sep 2005 10:19:42 -0000
@@ -4398,7 +4398,7 @@ get_attendee_list (GSList *attendee_list
 		a->value = icalproperty_get_attendee (attendee->prop);
 
 		if (attendee->member_param)
-			a->member = icalparameter_get_member (attendee->member_param);		
+			a->member = g_strdup (icalparameter_get_member (attendee->member_param));		
 		if (attendee->cutype_param)
 			a->cutype = icalparameter_get_cutype (attendee->cutype_param);
 		else
@@ -4416,15 +4416,15 @@ get_attendee_list (GSList *attendee_list
 		else
 			a->rsvp = FALSE;
 		if (attendee->delfrom_param)
-			a->delfrom = icalparameter_get_delegatedfrom (attendee->delfrom_param);
+			a->delfrom = g_strdup (icalparameter_get_delegatedfrom (attendee->delfrom_param));
 		if (attendee->delto_param)
-			a->delto = icalparameter_get_delegatedto (attendee->delto_param);
+			a->delto = g_strdup (icalparameter_get_delegatedto (attendee->delto_param));
 		if (attendee->sentby_param)
-			a->sentby = icalparameter_get_sentby (attendee->sentby_param);
+			a->sentby = g_strdup (icalparameter_get_sentby (attendee->sentby_param));
 		if (attendee->cn_param)
-			a->cn = icalparameter_get_cn (attendee->cn_param);
+			a->cn = g_strdup (icalparameter_get_cn (attendee->cn_param));
 		if (attendee->language_param)
-			a->language = icalparameter_get_language (attendee->language_param);
+			a->language = g_strdup (icalparameter_get_language (attendee->language_param));
 
 		*al = g_slist_prepend (*al, a);
 	}


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