dovecot: Fix

dovecot at dovecot.org dovecot at dovecot.org
Tue Oct 16 19:36:26 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/d8343f5863d3
changeset: 6552:d8343f5863d3
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 16 19:36:23 2007 +0300
description:
Fix

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/lib/istream-crlf.c |    6 ++++--

diffs (17 lines):

diff -r 9bdc9ecfc470 -r d8343f5863d3 src/lib/istream-crlf.c
--- a/src/lib/istream-crlf.c	Tue Oct 16 19:25:56 2007 +0300
+++ b/src/lib/istream-crlf.c	Tue Oct 16 19:36:23 2007 +0300
@@ -108,9 +108,11 @@ static ssize_t i_stream_crlf_read(struct
 		stream->w_buffer[dest++] = data[i];
 	}
 	i_stream_skip(cstream->input, i);
+
+	ret = dest - stream->pos;
+	i_assert(ret > 0);
 	stream->pos = dest;
-
-	return dest - stream->pos;
+	return ret;
 }
 
 static void ATTR_NORETURN


More information about the dovecot-cvs mailing list