dovecot-2.1: auth: Don't re-add IO to master connection input.

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 7 19:17:31 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/21566f1780ef
changeset: 13612:21566f1780ef
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 07 19:25:52 2011 +0300
description:
auth: Don't re-add IO to master connection input.
This fixes a panic crash in some situations.

diffstat:

 src/auth/auth-master-connection.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 99ff7bf3c490 -r 21566f1780ef src/auth/auth-master-connection.c
--- a/src/auth/auth-master-connection.c	Fri Oct 07 18:18:20 2011 +0300
+++ b/src/auth/auth-master-connection.c	Fri Oct 07 19:25:52 2011 +0300
@@ -566,7 +566,8 @@
 		return 1;
 	}
 
-	if (o_stream_get_buffer_used_size(conn->output) <= MAX_OUTBUF_SIZE/2) {
+	if (conn->io == NULL &&
+	    o_stream_get_buffer_used_size(conn->output) <= MAX_OUTBUF_SIZE/2) {
 		/* allow input again */
 		conn->io = io_add(conn->fd, IO_READ, master_input, conn);
 	}


More information about the dovecot-cvs mailing list