From: Timo Sirainen Date: Mon, 8 Aug 2016 12:51:17 +0000 (+0300) Subject: lib: ostream-temp didn't update offset when dup()ing fd. X-Git-Tag: 2.2.26~410 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f960799d4760bd959631b4c47fe92b4d19e4564e;p=thirdparty%2Fdovecot%2Fcore.git lib: ostream-temp didn't update offset when dup()ing fd. --- diff --git a/src/lib/iostream-temp.c b/src/lib/iostream-temp.c index c87ffef9fe..be3adcf05d 100644 --- a/src/lib/iostream-temp.c +++ b/src/lib/iostream-temp.c @@ -174,6 +174,8 @@ static off_t o_stream_temp_dup_istream(struct temp_ostream *outstream, ret = in_size - instream->v_offset; i_stream_seek(instream, in_size); outstream->dupstream_offset = instream->v_offset; + outstream->ostream.ostream.offset = + outstream->dupstream_offset - outstream->dupstream_start_offset; return ret; }