+2008-06-25 Jeffrey Stedfast <fejj@novell.com>
+
+ * camel-mime-utils.c (camel_header_decode_date): Don't crash if
+ the str argument is NULL.
+
+ * camel-folder-summary.c (message_info_new_from_header): Don't
+ allow ourselves to pass NULL as the str argument to
+ camel_header_decode_date().
+
2008-06-21 Jeffrey Stedfast <fejj@novell.com>
* broken-date-parser.[c,h]: Removed, more-or-less moved into
static CamelMessageInfo *
message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
{
+ const char *received, *date, *content, *charset = NULL;
+ struct _camel_header_references *refs, *irt, *scan;
+ char *subject, *from, *to, *cc, *mlist;
+ CamelContentType *ct = NULL;
CamelMessageInfoBase *mi;
- const char *received;
guint8 *digest;
gsize length;
- struct _camel_header_references *refs, *irt, *scan;
char *msgid;
int count;
- char *subject, *from, *to, *cc, *mlist;
- CamelContentType *ct = NULL;
- const char *content, *charset = NULL;
length = g_checksum_type_get_length (G_CHECKSUM_MD5);
digest = g_alloca (length);
mi->user_flags = NULL;
mi->user_tags = NULL;
- mi->date_sent = camel_header_decode_date(camel_header_raw_find(&h, "date", NULL), NULL);
+
+ if ((date = camel_header_raw_find (&h, "date", NULL)))
+ mi->date_sent = camel_header_decode_date (date, NULL);
+ else
+ mi->date_sent = 0;
+
received = camel_header_raw_find(&h, "received", NULL);
if (received)
received = strrchr(received, ';');