]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
iostream-rawlog: Don't assert-crash if trying to write 0 bytes.
authorTimo Sirainen <tss@iki.fi>
Thu, 8 Nov 2012 22:31:07 +0000 (00:31 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 Nov 2012 22:31:07 +0000 (00:31 +0200)
src/lib/iostream-rawlog.c

index 0325a8d6a90b54c22408a0cbbc6e0c4812c4039e..c6103ce21f1ee68e7c7cf0e0beabd5ec06d85279 100644 (file)
@@ -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) {