[evolution-patches] Re: patch for crash in evo 2.0



On Mon, 2004-09-06 at 10:48 +0200, Kjartan Maraas wrote:
> man, 06,.09.2004 kl. 09.14 +0100, skrev Mark McLoughlin:
> > Hey,
> > 
> > On Fri, 2004-09-03 at 13:22, Rodrigo Moya wrote:
> > > The bug is: http://bugzilla.ximian.com/show_bug.cgi?id=57443 (ICS import
> > > crashes)
> > > 
> > > The reason for crashing is that libical does not support multivalued
> > > datetime's, so it sets the error to FATAL and gets to that stupid assert
> > > (0) which makes evolution crash.
> > > 
> > > I was looking at fixing the real problem, but seems too big a patch for
> > > 2.0, so sending this patch in the meanwhile. We probably want to add a
> > > new bug about that unsupported multivalued datetimes, and set it to
> > > 2.0.1?
> > 
> > 	Ouch - external input triggering an assertion?
> > 
> > 	Looks worthwhile - approval 1 of 2.
> > 
> I trust you guys' on this
> 
> 2 of 2
> 
thanks for the trust, but the patch was not really correct :), since it
was caused by a wrong use of the #ifdef ICAL_ERRORS_ARE_FATAL. This is
always defined, even though we set it to 0 in configure.in, so
icalerror_errors_are_fatal was always set to TRUE, which makes libical
crash evolution every time there is a fatal error.

So, this updated patch makes correct use of the ICAL_ERRORS_ARE_FATAL.
-- 
Rodrigo Moya <rodrigo novell com>
? src/libicalss/icalssyacc.output
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libical/ChangeLog,v
retrieving revision 1.164
diff -u -p -r1.164 ChangeLog
--- ChangeLog	2 Aug 2004 11:35:45 -0000	1.164
+++ ChangeLog	6 Sep 2004 11:10:00 -0000
@@ -1,3 +1,10 @@
+2004-09-03  Rodrigo Moya <rodrigo novell com>
+
+	Fixes crash in #57443
+
+	* src/libical/icalerror.c (icalerror_errors_are_fatal): s/#ifdef/#if,
+	so that we check against the value, not the definition being available.
+
 2004-08-02  Not Zed  <NotZed Ximian com>
 
 	* src/libicalvcal/vcc.y: re-alloc when we reach the buffer length,
Index: src/libical/icalerror.c
===================================================================
RCS file: /cvs/gnome/libical/src/libical/icalerror.c,v
retrieving revision 1.13
diff -u -p -r1.13 icalerror.c
--- src/libical/icalerror.c	21 Oct 2003 18:28:28 -0000	1.13
+++ src/libical/icalerror.c	6 Sep 2004 11:10:01 -0000
@@ -97,7 +97,7 @@ void icalerror_set_errno(icalerrorenum x
        (icalerror_get_error_state(x)==ICAL_ERROR_DEFAULT && 
         icalerror_errors_are_fatal == 1 )){ 
         icalerror_warn(icalerror_strerror(x)); 
-        assert(0); 
+        assert(0);
     } 
 
 }
@@ -108,7 +108,7 @@ void icalerror_clear_errno() {
     icalerrno = ICAL_NO_ERROR;
 }
 
-#ifdef ICAL_ERRORS_ARE_FATAL
+#if ICAL_ERRORS_ARE_FATAL == 1
 int icalerror_errors_are_fatal = 1;
 #else
 int icalerror_errors_are_fatal = 0;


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