dovecot-2.2: imap: Fixed potential assert crash in APPEND.

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 21 19:41:04 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/0d966f8d53be
changeset: 16697:0d966f8d53be
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 21 19:40:54 2013 +0300
description:
imap: Fixed potential assert crash in APPEND.

diffstat:

 src/imap/cmd-append.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r c4f754d6967e -r 0d966f8d53be src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Sat Aug 17 15:01:25 2013 +0000
+++ b/src/imap/cmd-append.c	Wed Aug 21 19:40:54 2013 +0300
@@ -829,7 +829,9 @@
 		/* finished - do one more read, to make sure istream-chain
 		   unreferences its stream, which is needed for litinput's
 		   unreferencing to seek the client->input to correct
-		   position */
+		   position. the seek is needed to avoid trying to seek
+		   backwards in the ctx->input's parent stream. */
+		i_stream_seek(ctx->input, ctx->input->v_offset);
 		(void)i_stream_read(ctx->input);
 		i_stream_unref(&ctx->litinput);
 


More information about the dovecot-cvs mailing list