]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: istream's max_buffer_size=0 means 0, not unlimited.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 4 May 2016 15:24:03 +0000 (18:24 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 2 Jun 2016 12:47:04 +0000 (15:47 +0300)
Make sure we don't grow the buffer size then.

src/lib/istream.c

index c5bf2d6c29e631339d0d221f6668f9707e4544d1..de2c95582c2c7c6355ca9cb57b19fda2d4eef970 100644 (file)
@@ -622,8 +622,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);
                }