From: Timo Sirainen Date: Tue, 28 Jun 2016 18:59:26 +0000 (+0300) Subject: lib: Added assert to iostream-temp X-Git-Tag: 2.3.0.rc1~3411 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61d57efe9dee0dd38b0f726ef85e3c710cb655fc;p=thirdparty%2Fdovecot%2Fcore.git lib: Added assert to iostream-temp Input stream isn't expected to shrink here. Potentially this could be changed to an error instead. --- diff --git a/src/lib/iostream-temp.c b/src/lib/iostream-temp.c index ddb0befbbd..1b3583d5c0 100644 --- a/src/lib/iostream-temp.c +++ b/src/lib/iostream-temp.c @@ -184,6 +184,7 @@ o_stream_temp_dup_istream(struct temp_ostream *outstream, return o_stream_temp_dup_cancel(outstream, res_r); return FALSE; } + i_assert(instream->v_offset <= in_size); if (outstream->dupstream == NULL) { outstream->dupstream = instream;