[evolution-patches] [calendar] fix for bug #272176



Attached patch fixes bug#272176 (slight deviations in vCal-format cause
evolution-crash)

Please review

Regards,
Dinesh Layek

Index: mkderivedvalues.pl
===================================================================
RCS file: /cvs/gnome/libical/scripts/mkderivedvalues.pl,v
retrieving revision 1.10
diff -u -p -r1.10 mkderivedvalues.pl
--- mkderivedvalues.pl	11 Sep 2003 22:04:03 -0000	1.10
+++ mkderivedvalues.pl	26 Sep 2005 11:37:50 -0000
@@ -206,9 +206,14 @@ void icalvalue_set_${lc}(icalvalue* valu
     impl->data.v_$union_data = $assign \n\
     icalvalue_reset_kind(impl);\n}\n";
 
-    print "$type\ icalvalue_get_${lc}(const icalvalue* value)\ {\n\
-    icalerror_check_arg( (value!=0),\"value\");\
-    icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
+    print "$type\ icalvalue_get_${lc} (const icalvalue* value) {\n\n";
+    if( $union_data eq 'string') {
+	print "    icalerror_check_arg_rz ((value!=0),\"value\");\n";
+    }
+    else {
+	print "    icalerror_check_arg ((value!=0),\"value\");\n";
+    }
+    print "    icalerror_check_value_type (value, ICAL_${uc}_VALUE);\
     return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n";
 
     
Index: ../ChangeLog
===================================================================
RCS file: /cvs/gnome/libical/ChangeLog,v
retrieving revision 1.178
diff -u -p -r1.178 ChangeLog
--- ../ChangeLog	20 Sep 2005 02:20:53 -0000	1.178
+++ ../ChangeLog	26 Sep 2005 11:37:51 -0000
@@ -1,3 +1,7 @@
+2005-09-26  Dinesh Layek <ldinesh novell com>
+	* scripts/mkderivedvalues.pl: changed the code to make the
+	functions, which returns a string, return NULL on NULL input.
+
 2005-09-20  Irene Huang <Irene Huang sun com>
 
 	* src/libical/icalcomponent.c: (icalcomponent_get_datetime):


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