From efe4fc5ee64497b27cef6aff8d573cafe6f418a3 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 30 Oct 2001 20:19:42 +0000 Subject: Allocate enough space for the string! (was missing the null terminator) 2001-10-30 Federico Mena Quintero * gui/itip-utils.c (itip_send_comp): Allocate enough space for the string! (was missing the null terminator) Possibly fixes #13924. Thanks a *LOT* to Michael Zucchi for running this through Purify. svn path=/trunk/; revision=14477 --- calendar/gui/itip-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/itip-utils.c') diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index e6be9ccef7..013787ee39 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -718,9 +718,9 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp) ical_string = comp_string (method, comp); attach_data = GNOME_Evolution_Composer_AttachmentData__alloc (); - attach_data->_length = strlen (ical_string); + attach_data->_length = strlen (ical_string) + 1; attach_data->_maximum = attach_data->_length; - attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length); + attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length); strcpy (attach_data->_buffer, ical_string); GNOME_Evolution_Composer_attachData (composer_server, -- cgit v1.2.3