[dovecot-cvs] dovecot/src/lib ostream-crlf.c,1.8,1.9
cras at dovecot.org
cras at dovecot.org
Thu Dec 16 03:37:16 EET 2004
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv30829
Modified Files:
ostream-crlf.c
Log Message:
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.
Index: ostream-crlf.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-crlf.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ostream-crlf.c 8 Oct 2004 17:51:48 -0000 1.8
+++ ostream-crlf.c 16 Dec 2004 01:37:14 -0000 1.9
@@ -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;
More information about the dovecot-cvs
mailing list