]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
i_stream_raw_mbox_read(): If we already detected corruption, return failure instead...
authorTimo Sirainen <tss@iki.fi>
Sat, 13 Dec 2008 06:36:16 +0000 (08:36 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 13 Dec 2008 06:36:16 +0000 (08:36 +0200)
--HG--
branch : HEAD

src/lib-storage/index/mbox/istream-raw-mbox.c

index 32bf7139cbfe4250b87447df60ea2c5c97211bae..52670fc414323a75057fe24da548daa777a76d03 100644 (file)
@@ -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);