From: Timo Sirainen Date: Thu, 10 Dec 2009 01:03:33 +0000 (-0500) Subject: mbox: Log an error if From_-line gets lost/corrupted unexpectedly. X-Git-Tag: 2.0.beta1~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f4545450bcdb33f93f1316cdf0945b7308f78f4;p=thirdparty%2Fdovecot%2Fcore.git mbox: Log an error if From_-line gets lost/corrupted unexpectedly. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/istream-raw-mbox.c b/src/lib-storage/index/mbox/istream-raw-mbox.c index 55eb615b22..149f2228ba 100644 --- a/src/lib-storage/index/mbox/istream-raw-mbox.c +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c @@ -255,6 +255,11 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream) 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;