evolution-data-server r9846 - trunk/camel/providers/groupwise
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9846 - trunk/camel/providers/groupwise
- Date: Tue, 23 Dec 2008 09:25:38 +0000 (UTC)
Author: psankar
Date: Tue Dec 23 09:25:37 2008
New Revision: 9846
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9846&view=rev
Log:
2008-12-23 Sankar P <psankar novell com>
** Part of fix for bnc bug #448079
* camel/providers/groupwise/camel-groupwise-folder.c:
Avoid invalid reads by validating optional fields.
Part 2 of the fixes
Modified:
trunk/camel/providers/groupwise/ChangeLog
trunk/camel/providers/groupwise/camel-groupwise-folder.c
Modified: trunk/camel/providers/groupwise/camel-groupwise-folder.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-folder.c (original)
+++ trunk/camel/providers/groupwise/camel-groupwise-folder.c Tue Dec 23 09:25:37 2008
@@ -229,8 +229,11 @@
time_t actual_time;
int offset = 0;
dtstring = e_gw_item_get_creation_date (item);
- time = e_gw_connection_get_date_from_string (dtstring);
- actual_time = camel_header_decode_date (ctime(&time), NULL);
+ if (dtstring) {
+ time = e_gw_connection_get_date_from_string (dtstring);
+ actual_time = camel_header_decode_date (ctime(&time), NULL);
+ } else
+ actual_time = (time_t) 0;
camel_mime_message_set_date (msg, actual_time, offset);
}
}
@@ -1674,8 +1677,11 @@
time_t time;
time_t actual_time;
temp_date = e_gw_item_get_creation_date (item);
- time = e_gw_connection_get_date_from_string (temp_date);
- actual_time = camel_header_decode_date (ctime(&time), NULL);
+ if (temp_date) {
+ time = e_gw_connection_get_date_from_string (temp_date);
+ actual_time = camel_header_decode_date (ctime(&time), NULL);
+ } else
+ actual_time = (time_t) 0;
mi->info.date_sent = mi->info.date_received = actual_time;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]