[evolution-patches] Patch that Fixes bug#74218 (evolution-exchange)



Hi,

The attached patch fixes
http://bugzilla.ximian.com/show_bug.cgi?id=74218

changes are made in calendar/e-cal-backend-exchange-calendar.c 
There was a crash, as the string that was not allocated, gets freed
later on.
I am allocating the string before its assigned.

Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.319
diff -u -p -r1.319 ChangeLog
--- ChangeLog	5 Apr 2005 06:32:40 -0000	1.319
+++ ChangeLog	5 Apr 2005 13:04:28 -0000
@@ -1,5 +1,12 @@
 2005-04-05  Vivek Jain  <jvivek novell com>
 
+	**Fixes #74218
+	* calendar/e-cal-backend-exchange-calendar.c
+	(modify_object_with_href):dup the string before assigning the 
+	valuereturned by icaltimezone_get_tzid. 
+
+2005-04-05  Vivek Jain  <jvivek novell com>
+
        **Fixes #42376
        * storage/exchange-account.c :
        (exchange_account_remove_folder):
Index: calendar/e-cal-backend-exchange-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange-calendar.c,v
retrieving revision 1.40
diff -u -p -r1.40 e-cal-backend-exchange-calendar.c
--- calendar/e-cal-backend-exchange-calendar.c	14 Mar 2005 09:23:37 -0000	1.40
+++ calendar/e-cal-backend-exchange-calendar.c	5 Apr 2005 13:04:28 -0000
@@ -1023,7 +1023,7 @@ modify_object_with_href (ECalBackendSync
 		dt.value->is_utc = FALSE;
 		dt.value->hour = dt.value->minute = dt.value->second = 0;
 		dt.value->zone = zone;
-		dt.tzid = icaltimezone_get_tzid (zone);
+		dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
 		e_cal_component_set_dtstart (real_ecomp, &dt);
 		e_cal_component_free_datetime (&dt);
 
@@ -1032,7 +1032,7 @@ modify_object_with_href (ECalBackendSync
 		dt.value->is_utc = FALSE;
 		dt.value->hour = dt.value->minute = dt.value->second = 0;
 		dt.value->zone = zone;
-		dt.tzid = icaltimezone_get_tzid (zone);
+		dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
 		e_cal_component_set_dtend (real_ecomp, &dt);
 	}
 	e_cal_component_free_datetime (&dt);


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