dovecot-2.2: i_stream_read(): Added assert.

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 4 21:19:07 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/285e1c6a2115
changeset: 16169:285e1c6a2115
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 04 21:18:45 2013 +0300
description:
i_stream_read(): Added assert.

diffstat:

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

diffs (11 lines):

diff -r 096ad7cd6e9e -r 285e1c6a2115 src/lib/istream.c
--- a/src/lib/istream.c	Thu Apr 04 21:18:28 2013 +0300
+++ b/src/lib/istream.c	Thu Apr 04 21:18:45 2013 +0300
@@ -133,6 +133,7 @@
 
 	old_size = _stream->pos - _stream->skip;
 	ret = _stream->read(_stream);
+	i_assert(old_size <= _stream->pos - _stream->skip);
 	switch (ret) {
 	case -2:
 		i_assert(_stream->skip != _stream->pos);


More information about the dovecot-cvs mailing list