From: Timo Sirainen Date: Sat, 13 Dec 2008 06:36:16 +0000 (+0200) Subject: i_stream_raw_mbox_read(): If we already detected corruption, return failure instead... X-Git-Tag: 1.2.alpha5~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f401b033012a068d11c19ae6dfad2b809331ca65;p=thirdparty%2Fdovecot%2Fcore.git i_stream_raw_mbox_read(): If we already detected corruption, return failure instead of assert-crashing. --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 32bf7139cb..52670fc414 100644 --- a/src/lib-storage/index/mbox/istream-raw-mbox.c +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c @@ -148,6 +148,10 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream) if (stream->istream.eof) return -1; + if (rstream->corrupted) { + rstream->istream.istream.stream_errno = EINVAL; + return -1; + } i_stream_seek(stream->parent, stream->istream.v_offset);