dovecot-1.2: auth cache: Don't crash if trying to lookup credent...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 21 22:02:58 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/992cfb5ebdb0
changeset: 8763:992cfb5ebdb0
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 21 14:38:51 2009 -0500
description:
auth cache: Don't crash if trying to lookup credentials for NULL password.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/auth/passdb-cache.c |    2 +-

diffs (12 lines):

diff -r 4cbfff403813 -r 992cfb5ebdb0 src/auth/passdb-cache.c
--- a/src/auth/passdb-cache.c	Sat Feb 21 14:16:22 2009 -0500
+++ b/src/auth/passdb-cache.c	Sat Feb 21 14:38:51 2009 -0500
@@ -116,7 +116,7 @@ bool passdb_cache_lookup_credentials(str
 	auth_request_set_fields(request, list + 1, NULL);
 
 	*result_r = PASSDB_RESULT_OK;
-	*password_r = list[0];
+	*password_r = *list[0] == '\0' ? NULL : list[0];
 	*scheme_r = password_get_scheme(password_r);
 	i_assert(*scheme_r != NULL || *password_r == NULL);
 


More information about the dovecot-cvs mailing list