dovecot-1.1: If mail parsing was aborted (mail saving was aborte...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 5 02:04:32 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/63ef0998cd53
changeset: 7349:63ef0998cd53
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 05 02:04:29 2008 +0200
description:
If mail parsing was aborted (mail saving was aborted), don't even try to
generate data to be cached to avoid crashes.

diffstat:

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

diffs (16 lines):

diff -r 32d555a08443 -r 63ef0998cd53 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c	Wed Mar 05 02:03:50 2008 +0200
+++ b/src/lib-storage/index/index-mail.c	Wed Mar 05 02:04:29 2008 +0200
@@ -707,6 +707,12 @@ static void index_mail_parse_body_finish
 				  &mail->data.parts) < 0) {
 		mail_set_cache_corrupted(&mail->mail.mail,
 					 MAIL_FETCH_MESSAGE_PARTS);
+		return;
+	}
+	if (mail->data.no_caching) {
+		/* if we're here because we aborted parsing, don't get any
+		   further or we may crash while generating output from
+		   incomplete data */
 		return;
 	}
 


More information about the dovecot-cvs mailing list