Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3412:27d15196e53e HEAD
Don't pass NULL date to message_date_parse(). It crashes nowadays.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 06 Jun 2005 00:42:00 +0300 |
parents | 77ad773054dd |
children | b0b83a2fba69 |
files | src/lib-storage/index/index-mail.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c Mon Jun 06 00:40:56 2005 +0300 +++ b/src/lib-storage/index/index-mail.c Mon Jun 06 00:42:00 2005 +0300 @@ -263,8 +263,9 @@ data->save_sent_date = TRUE; str = mail_get_first_header(_mail, "Date"); if (data->sent_date.time == (time_t)-1) { - if (!message_date_parse((const unsigned char *)str, - (size_t)-1, + if (str == NULL || + !message_date_parse((const unsigned char *)str, + strlen(str), &data->sent_date.time, &tz)) { /* 0 == parse error */ data->sent_date.time = 0;