[evolution-patches] A patch for calendar based on trunk



Hi,

This patch is aimed for trunk. We have found a bug in calendar which can be reproduced as follows:
1.Invoke your evolution.
2.Create a new task
3.Save and close it
4.Forward it as iCalnedar and send it to yoursevles
5.Explore this mail and open it with gedit

Actual result:
After #5, an error information will be displayed and you can't open the attachment that is task information with gedit. Enclosed is a patch to fix that. Would you like to spend a little time to review it?

Best regards
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2147
diff -u -r1.2147 ChangeLog
--- calendar/ChangeLog	11 Feb 2004 17:05:52 -0000	1.2147
+++ calendar/ChangeLog	12 Feb 2004 05:37:47 -0000
@@ -1,3 +1,7 @@
+2004-02-12  Kidd Wang  <kidd wang sun com>
+
+	* gui/itip-utils.c: (itip_send_comp): set the string length properly.
+
 2004-02-11  Rodrigo Moya <rodrigo ximian com>
 
 	Fixes #53886
Index: calendar/gui/itip-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/itip-utils.c,v
retrieving revision 1.86
diff -u -r1.86 itip-utils.c
--- calendar/gui/itip-utils.c	6 Feb 2004 03:03:44 -0000	1.86
+++ calendar/gui/itip-utils.c	12 Feb 2004 05:37:48 -0000
@@ -916,10 +916,10 @@
 		}
 
 		attach_data = GNOME_Evolution_Composer_AttachmentData__alloc ();
-		attach_data->_length = strlen (ical_string) + 1;
+		attach_data->_length = strlen (ical_string);
 		attach_data->_maximum = attach_data->_length;	
 		attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
-		strcpy (attach_data->_buffer, ical_string);
+		memcpy (attach_data->_buffer, ical_string, attach_data->_length);
 
 		GNOME_Evolution_Composer_attachData (composer_server,
 						     content_type, filename, description,


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