dovecot-2.2: lib: istream-concat read() returned -2 too early.

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 27 13:30:45 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/31efe2d04793
changeset: 17535:31efe2d04793
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 27 16:29:18 2014 +0300
description:
lib: istream-concat read() returned -2 too early.

diffstat:

 src/lib/istream-concat.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r fe0c69112049 -r 31efe2d04793 src/lib/istream-concat.c
--- a/src/lib/istream-concat.c	Fri Jun 27 16:20:25 2014 +0300
+++ b/src/lib/istream-concat.c	Fri Jun 27 16:29:18 2014 +0300
@@ -145,7 +145,7 @@
 		/* we either read something or we're at EOF */
 		last_stream = cstream->input[cstream->cur_idx+1] == NULL;
 		if (ret == -1 && !last_stream) {
-			if (stream->pos >= stream->max_buffer_size)
+			if (stream->pos - stream->skip >= stream->max_buffer_size)
 				return -2;
 
 			i_stream_concat_read_next(cstream);


More information about the dovecot-cvs mailing list