From 5f4545450bcdb33f93f1316cdf0945b7308f78f4 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 9 Dec 2009 20:03:33 -0500 Subject: [PATCH] mbox: Log an error if From_-line gets lost/corrupted unexpectedly. --HG-- branch : HEAD --- src/lib-storage/index/mbox/istream-raw-mbox.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.47.3