Fixes a invalid read.
authorChenthill Palanisamy <pchen@src.gnome.org>
Fri, 8 Sep 2006 08:17:22 +0000 (08:17 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Fri, 8 Sep 2006 08:17:22 +0000 (08:17 +0000)
calendar/ChangeLog
calendar/backends/http/e-cal-backend-http.c

index 57903be..922fd64 100644 (file)
@@ -1,3 +1,10 @@
+2006-09-06  Chenthill Palanisamy  <pchenthill@novell.com>
+
+       Fixes a invalid read.
+       * backends/http/e-cal-backend-http.c: (retrieval_done):
+       clone the icalcomp before setting it in the new ECalComponent.
+       See bug #352596
+
 2006-08-24  Chenthill Palanisamy  <pchenthill@novell.com>
 
        Fixes the gslice crash
index 92c0e0b..0e623c9 100644 (file)
@@ -330,7 +330,7 @@ retrieval_done (SoupMessage *msg, ECalBackendHttp *cbhttp)
 
                if (subcomp_kind == kind) {
                        comp = e_cal_component_new ();
-                       if (e_cal_component_set_icalcomponent (comp, subcomp)) {
+                       if (e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (subcomp))) {
                                const char *uid, *orig_key, *orig_value;
 
                                e_cal_backend_cache_put_component (priv->cache, comp);
@@ -352,7 +352,7 @@ retrieval_done (SoupMessage *msg, ECalBackendHttp *cbhttp)
                        icaltimezone *zone;
 
                        zone = icaltimezone_new ();
-                       icaltimezone_set_component (zone, subcomp);
+                       icaltimezone_set_component (zone, icalcomponent_new_clone (subcomp));
                        e_cal_backend_cache_put_timezone (priv->cache, (const icaltimezone *) zone);
 
                        icaltimezone_free (zone, 1);