]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
aggregator: Fix assert-crash when output to replicator starts queuing
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 10 Jan 2023 23:23:03 +0000 (01:23 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Feb 2023 15:32:04 +0000 (15:32 +0000)
commitcb13e555b2f95ffa349fabe2e6c45f87264c2e3f
treeeb4ba8fe3939b2bb9ca677291c121882b325b0f4
parent6f063cd770822f29ebdc3503d849371c56ae18da
aggregator: Fix assert-crash when output to replicator starts queuing

If the output was less than IO_BLOCK_SIZE (as it usually would be), the code
just skipped over the whole buffered output and was confused that it didn't
find LF. Fixed by skipping over all but the last byte in the buffer, which
should be the LF.

Fixes:
Panic: file replicator-connection.c: line 99 (replicator_send_buf): assertion failed: (len < buf->used)
src/replication/aggregator/replicator-connection.c