dovecot-2.0: mbox: Log an error if From_-line gets lost/corrupte...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 10 03:07:01 EET 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/576abd71121c
changeset: 10445:576abd71121c
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Dec 09 20:03:33 2009 -0500
description:
mbox: Log an error if From_-line gets lost/corrupted unexpectedly.

diffstat:

1 file changed, 5 insertions(+)
src/lib-storage/index/mbox/istream-raw-mbox.c |    5 +++++

diffs (15 lines):

diff -r ba7a62453316 -r 576abd71121c src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Wed Dec 09 19:46:16 2009 -0500
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Wed Dec 09 20:03:33 2009 -0500
@@ -255,6 +255,11 @@ static ssize_t i_stream_raw_mbox_read(st
 			return i_stream_raw_mbox_read(stream);
 		}
 		if (mbox_read_from_line(rstream) < 0) {
+			if (stream->istream.v_offset != 0) {
+				i_error("Next message unexpectedly corrupted in mbox file "
+					"%s at %"PRIuUOFF_T, rstream->path,
+					stream->istream.v_offset);
+			}
 			stream->pos = 0;
 			rstream->eof = TRUE;
 			rstream->corrupted = TRUE;


More information about the dovecot-cvs mailing list