dovecot-1.1: i_stream_raw_mbox_read(): If we already detected co...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Dec 13 09:39:52 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/f28348c5201e
changeset: 8033:f28348c5201e
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 caaed84ae7df -r f28348c5201e src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c Sat Dec 06 07:47:02 2008 +0200
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c Sat Dec 13 08:36:16 2008 +0200
@@ -147,6 +147,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