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

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 10 03:03:46 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/8d4621094e54
changeset: 9503:8d4621094e54
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 91c6b067f464 -r 8d4621094e54 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Wed Dec 09 19:44:35 2009 -0500
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Wed Dec 09 20:03:33 2009 -0500
@@ -265,6 +265,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