From 61d57efe9dee0dd38b0f726ef85e3c710cb655fc Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 28 Jun 2016 21:59:26 +0300 Subject: [PATCH] lib: Added assert to iostream-temp Input stream isn't expected to shrink here. Potentially this could be changed to an error instead. --- src/lib/iostream-temp.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.47.3