dovecot: Don't crash with 0 byte mails when saving/copying them ...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jan 6 11:24:07 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/0c1859ca8ee9
changeset: 7129:0c1859ca8ee9
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jan 06 11:24:04 2008 +0200
description:
Don't crash with 0 byte mails when saving/copying them and trying to add
e.g. bodystructure to cache.

diffstat:

1 file changed, 3 insertions(+)
src/lib-storage/index/index-mail.c |    3 +++

diffs (13 lines):

diff -r 98788fdcc3a6 -r 0c1859ca8ee9 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c	Sun Jan 06 11:04:07 2008 +0200
+++ b/src/lib-storage/index/index-mail.c	Sun Jan 06 11:24:04 2008 +0200
@@ -1270,6 +1270,9 @@ void index_mail_cache_parse_deinit(struc
 {
 	struct index_mail *mail = (struct index_mail *)_mail;
 
+	/* This is needed with 0 byte mails to get hdr=NULL call done. */
+	index_mail_cache_parse_continue(_mail);
+
 	if (mail->data.received_date == (time_t)-1)
 		mail->data.received_date = received_date;
 	if (mail->data.save_date == (time_t)-1) {


More information about the dovecot-cvs mailing list