]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If mail parsing was aborted (mail saving was aborted), don't even try to
authorTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2008 00:04:29 +0000 (02:04 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2008 00:04:29 +0000 (02:04 +0200)
generate data to be cached to avoid crashes.

--HG--
branch : HEAD

src/lib-storage/index/index-mail.c

index 53ce41fe82143e17e525b38a4a43060d01486b34..a13ca5479a98a9d33abd4b60ad3b9b0e67c0b30e 100644 (file)
@@ -709,6 +709,12 @@ static void index_mail_parse_body_finish(struct index_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;
+       }
 
        (void)get_cached_msgpart_sizes(mail);