From: Timo Sirainen Date: Wed, 4 May 2016 15:24:03 +0000 (+0300) Subject: lib: istream's max_buffer_size=0 means 0, not unlimited. X-Git-Tag: 2.3.0.rc1~3839 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07b3a7d8143c083c554e3169c672dacf068eeeb6;p=thirdparty%2Fdovecot%2Fcore.git lib: istream's max_buffer_size=0 means 0, not unlimited. Make sure we don't grow the buffer size then. --- diff --git a/src/lib/istream.c b/src/lib/istream.c index 1f7928be1f..9b05714286 100644 --- a/src/lib/istream.c +++ b/src/lib/istream.c @@ -621,8 +621,7 @@ bool i_stream_try_alloc(struct istream_private *stream, if (stream->skip > 0) { /* remove the unused bytes from beginning of buffer */ i_stream_compress(stream); - } else if (stream->max_buffer_size == 0 || - stream->buffer_size < stream->max_buffer_size) { + } else if (stream->buffer_size < stream->max_buffer_size) { /* buffer is full - grow it */ i_stream_grow_buffer(stream, I_STREAM_MIN_SIZE); }