dovecot-1.2: i_stream_raw_mbox_read(): If we already detected co...

dovecot at dovecot.org dovecot at dovecot.org
Sat Dec 13 09:38:58 EET 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/9c8b0f8075d2
changeset: 8525:9c8b0f8075d2
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Dec 13 08:36:16 2008 +0200
description:
i_stream_raw_mbox_read(): If we already detected corruption, return failure instead of assert-crashing.

diffstat:

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

diffs (14 lines):

diff -r 60080a56ebc7 -r 9c8b0f8075d2 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Mon Dec 08 18:44:31 2008 +0200
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Sat Dec 13 08:36:16 2008 +0200
@@ -148,6 +148,10 @@ static ssize_t i_stream_raw_mbox_read(st
 
 	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);
 


More information about the dovecot-cvs mailing list