Mercurial > dovecot > core-2.2
changeset 2982:3dedde6646c5 HEAD
LF-stream might have counted the bytes wrong in certain situations, causing
it to skip more data from input than it should have. Caused hangs sometimes
when APPENDing into mbox.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 16 Dec 2004 03:37:14 +0200 |
parents | ac10b761f179 |
children | c20a64efd608 |
files | src/lib/ostream-crlf.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ostream-crlf.c Thu Dec 16 03:35:40 2004 +0200 +++ b/src/lib/ostream-crlf.c Thu Dec 16 03:37:14 2004 +0200 @@ -298,7 +298,6 @@ if (new_iov_count == 0) { /* Tried to send only CR. */ ret = 0; - total++; } else { ret = sendv_lf(cstream, iov_buf->data, new_iov_count, diff_buf->data, &total); @@ -327,6 +326,7 @@ if (ret <= 0) return ret < 0 && sent == 0 ? -1 : (ssize_t)sent; + i_assert((size_t)ret <= iov.iov_len); i_stream_skip(instream, ret); sent += ret;