Mercurial > dovecot > core-2.2
changeset 17516:705fd8f3f485
lib-test: Fixed "Trying to allocate 0 bytes" assert-crash caused by recent test-istream changes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 25 Jun 2014 16:16:02 +0300 |
parents | 38cd37cea8b1 |
children | 55041cf555b7 |
files | src/lib-test/test-common.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-test/test-common.c Fri Jun 20 12:18:32 2014 +0300 +++ b/src/lib-test/test-common.c Wed Jun 25 16:16:02 2014 +0300 @@ -56,7 +56,7 @@ /* use exactly correct buffer size so valgrind can catch read overflows */ - if (stream->buffer_size != cur_max) { + if (stream->buffer_size != cur_max && cur_max > 0) { stream->w_buffer = i_realloc(stream->w_buffer, 0, cur_max); stream->buffer = stream->w_buffer;