Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8525:9c8b0f8075d2 HEAD
i_stream_raw_mbox_read(): If we already detected corruption, return failure instead of assert-crashing.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 13 Dec 2008 08:36:16 +0200 |
parents | 60080a56ebc7 |
children | c63cc3580150 |
files | src/lib-storage/index/mbox/istream-raw-mbox.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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);