Mercurial > dovecot > core-2.2
changeset 17467:899cf87a687c
director: Fixed crash if master_user_separator is set, but we didn't do a proxy lookup.
Found by Coverity
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 13 Jun 2014 00:57:06 +0300 |
parents | 800a28db8116 |
children | aac4f4b886d2 |
files | src/director/login-connection.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;