From: Timo Sirainen Date: Wed, 21 Aug 2013 16:40:54 +0000 (+0300) Subject: imap: Fixed potential assert crash in APPEND. X-Git-Tag: 2.2.6~127 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96581b055307a30ffde0e272902c161e4ca96c40;p=thirdparty%2Fdovecot%2Fcore.git imap: Fixed potential assert crash in APPEND. --- diff --git a/src/imap/cmd-append.c b/src/imap/cmd-append.c index 70d2c7a91e..791151055d 100644 --- a/src/imap/cmd-append.c +++ b/src/imap/cmd-append.c @@ -829,7 +829,9 @@ static bool cmd_append_continue_message(struct client_command_context *cmd) /* 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);