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

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 7 19:16:42 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/f6a2c0e8bc03
changeset: 12946:f6a2c0e8bc03
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 07 19:25:01 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 dbd5f9ec38af -r f6a2c0e8bc03 src/auth/auth-master-connection.c
--- a/src/auth/auth-master-connection.c	Sun Oct 02 20:26:02 2011 +0300
+++ b/src/auth/auth-master-connection.c	Fri Oct 07 19:25:01 2011 +0300
@@ -480,7 +480,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