From: Timo Sirainen Date: Thu, 8 Nov 2012 22:31:07 +0000 (+0200) Subject: iostream-rawlog: Don't assert-crash if trying to write 0 bytes. X-Git-Tag: 2.2.beta1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe91058fafc4da453161aecde6f2d48a8fae4a96;p=thirdparty%2Fdovecot%2Fcore.git iostream-rawlog: Don't assert-crash if trying to write 0 bytes. --- diff --git a/src/lib/iostream-rawlog.c b/src/lib/iostream-rawlog.c index 0325a8d6a9..c6103ce21f 100644 --- a/src/lib/iostream-rawlog.c +++ b/src/lib/iostream-rawlog.c @@ -95,7 +95,8 @@ void iostream_rawlog_write(struct rawlog_iostream *rstream, size_t pos; bool line_ends; - i_assert(size > 0); + if (size == 0) + return; io_loop_time_refresh(); if ((rstream->flags & IOSTREAM_RAWLOG_FLAG_BUFFERED) == 0) {