Re: [evolution-patches] fix for the bug #267330 [calendar]
- From: chen <pchenthill novell com>
- To: Veerapuram Varadhan <vvaradhan novell com>
- Cc: patches <evolution-patches gnome org>
- Subject: Re: [evolution-patches] fix for the bug #267330 [calendar]
- Date: Fri, 16 Dec 2005 13:30:31 +0530
Hi,
Have attached a revised fix.
thanks, Chenthill.
On Thu, 2005-12-01 at 03:16 -0500, Veerapuram Varadhan wrote:
> On Wed, 2005-11-30 at 13:48 +0000, chen wrote:
> >
> > + /* initialize */
> > + dtstart.tzid = NULL;
> > + dtstart.value = NULL;
> > + dtend.tzid = NULL;
> > + dtend.value = NULL;
> > +
>
> I would suggest these changes in the e_cal_component_get_(dtstart/dtend)
> APIs in e-d-s itself, instead of doing this initialization in all the
> places.
>
> Also, I guess, the general convention of any "get" method/function is to
> return a proper value on success and "NULL"/equivalent on failure.
>
> V. Varadhan
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.538
diff -u -p -r1.538 ChangeLog
--- ChangeLog 15 Dec 2005 11:23:33 -0000 1.538
+++ ChangeLog 16 Dec 2005 07:46:46 -0000
@@ -1,3 +1,10 @@
+2005-12-16 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #267330
+ * libecal/e-cal-component.c: (e_cal_component_get_dtend),
+ (e_cal_component_get_dtstart), (e_cal_component_get_due): Initialize
+ internal elements of the datetime to avoid crashing.
+
2005-12-15 Chenthill Palanisamy <pchenthill novell com>
Fixes #324009
Index: libecal/e-cal-component.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-component.c,v
retrieving revision 1.21
diff -u -p -r1.21 e-cal-component.c
--- libecal/e-cal-component.c 11 Oct 2005 07:56:20 -0000 1.21
+++ libecal/e-cal-component.c 16 Dec 2005 07:46:47 -0000
@@ -2447,9 +2447,13 @@ e_cal_component_get_dtend (ECalComponent
{
ECalComponentPrivate *priv;
+ g_return_if_fail (dt != NULL);
+
+ dt->tzid = NULL;
+ dt->value = NULL;
+
g_return_if_fail (comp != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
@@ -2563,9 +2567,13 @@ e_cal_component_get_dtstart (ECalCompone
{
ECalComponentPrivate *priv;
+ g_return_if_fail (dt != NULL);
+
+ dt->tzid = NULL;
+ dt->value = NULL;
+
g_return_if_fail (comp != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
@@ -2612,9 +2620,13 @@ e_cal_component_get_due (ECalComponent *
{
ECalComponentPrivate *priv;
+ g_return_if_fail (dt != NULL);
+
+ dt->tzid = NULL;
+ dt->value = NULL;
+
g_return_if_fail (comp != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
priv = comp->priv;
g_return_if_fail (priv->icalcomp != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]