dovecot-2.2: director: Fixed crash if master_user_separator is s...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 12 23:20:42 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/899cf87a687c
changeset: 17467:899cf87a687c
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 13 00:57:06 2014 +0300
description:
director: Fixed crash if master_user_separator is set, but we didn't do a proxy lookup.
Found by Coverity

diffstat:

 src/director/login-connection.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 800a28db8116 -r 899cf87a687c src/director/login-connection.c
--- a/src/director/login-connection.c	Fri Jun 13 00:51:44 2014 +0300
+++ b/src/director/login-connection.c	Fri Jun 13 00:57:06 2014 +0300
@@ -147,6 +147,10 @@
 				username = *args + 5;
 		}
 	}
+	if (!proxy || host || username == NULL) {
+		login_connection_send_line(conn, line);
+		return;
+	}
 	if (*conn->dir->set->master_user_separator != '\0') {
 		/* with master user logins we still want to use only the
 		   login username */
@@ -154,11 +158,6 @@
 				    *conn->dir->set->master_user_separator);
 	}
 
-	if (!proxy || host || username == NULL) {
-		login_connection_send_line(conn, line);
-		return;
-	}
-
 	/* we need to add the host. the lookup might be asynchronous */
 	request = i_new(struct login_host_request, 1);
 	request->conn = conn;


More information about the dovecot-cvs mailing list