dovecot: Don't assert-crash if underlying input stream read only...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 20 19:21:20 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/d85bfe89f4b8
changeset: 6563:d85bfe89f4b8
user: Timo Sirainen <tss at iki.fi>
date: Sat Oct 20 19:21:15 2007 +0300
description:
Don't assert-crash if underlying input stream read only a CR character.
diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
src/lib/istream-crlf.c | 5 ++++-
diffs (15 lines):
diff -r 8917cf7fa8ba -r d85bfe89f4b8 src/lib/istream-crlf.c
--- a/src/lib/istream-crlf.c Sat Oct 20 19:17:00 2007 +0300
+++ b/src/lib/istream-crlf.c Sat Oct 20 19:21:15 2007 +0300
@@ -100,7 +100,10 @@ static ssize_t i_stream_crlf_read(struct
i_stream_skip(cstream->input, i);
ret = dest - stream->pos;
- i_assert(ret > 0);
+ if (ret == 0) {
+ i_assert(cstream->last_char == '\r' && size == 1);
+ return i_stream_crlf_read(stream);
+ }
stream->pos = dest;
return ret;
}
More information about the dovecot-cvs
mailing list