From: Timo Sirainen Date: Tue, 16 Jun 2009 01:03:08 +0000 (-0400) Subject: auth: Don't assert-crash if trying to log in as master user but with empty login... X-Git-Tag: 2.0.alpha1~575 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93a398a012993fa3ee6ee374fa8409a3b578ddd6;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't assert-crash if trying to log in as master user but with empty login username. --HG-- branch : HEAD --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 4565df25cd..093578bebb 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -822,6 +822,11 @@ bool auth_request_set_username(struct auth_request *request, /* it does, set it. */ login_username = t_strdup_until(username, p); + if (*login_username == '\0') { + *error_r = "Empty login username"; + return FALSE; + } + /* username is the master user */ username = p + 1; }