dovecot-1.1: Earlier changes broke message parsing near EOF.

dovecot at dovecot.org dovecot at dovecot.org
Sun Oct 5 16:37:25 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/f55e58146f77
changeset: 7912:f55e58146f77
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Oct 05 16:37:20 2008 +0300
description:
Earlier changes broke message parsing near EOF.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/lib-mail/message-parser.c |    6 ++++--

diffs (16 lines):

diff -r a8d9bef71ffa -r f55e58146f77 src/lib-mail/message-parser.c
--- a/src/lib-mail/message-parser.c	Sun Oct 05 16:16:28 2008 +0300
+++ b/src/lib-mail/message-parser.c	Sun Oct 05 16:37:20 2008 +0300
@@ -388,8 +388,10 @@ static int parse_next_body_to_boundary(s
 	}
 	i_assert(!(ret == 0 && full));
 
-	if (ret >= 0 && !ctx->eof) {
-		/* leave CR+LF + last line to buffer */
+	if (ret > 0 || (ret == 0 && !ctx->eof)) {
+		/* a) we found the boundary
+		   b) we need more data and haven't reached EOF yet
+		   so leave CR+LF + last line to buffer */
 		block_r->size = boundary_start;
 	}
 	if (block_r->size != 0) {


More information about the dovecot-cvs mailing list