dovecot-2.0: istream-limit: Allow seeking past limit without ass...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 17 09:32:44 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/7705bd04924c
changeset: 12603:7705bd04924c
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 17 09:28:55 2011 +0200
description:
istream-limit: Allow seeking past limit without assert-crashing.
The next read() will simply return EOF.

diffstat:

 src/lib/istream-limit.c |  4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diffs (14 lines):

diff -r db7abf4a29e5 -r 7705bd04924c src/lib/istream-limit.c
--- a/src/lib/istream-limit.c	Thu Feb 17 09:01:38 2011 +0200
+++ b/src/lib/istream-limit.c	Thu Feb 17 09:28:55 2011 +0200
@@ -74,10 +74,6 @@
 static void i_stream_limit_seek(struct istream_private *stream, uoff_t v_offset,
 				bool mark ATTR_UNUSED)
 {
-	struct limit_istream *lstream = (struct limit_istream *) stream;
-
-	i_assert(v_offset <= lstream->v_size);
-
 	stream->istream.v_offset = v_offset;
 	stream->skip = stream->pos = 0;
 }


More information about the dovecot-cvs mailing list