dovecot-2.0: auth: Fixed ldap assert-crash.

dovecot at dovecot.org dovecot at dovecot.org
Sat Mar 5 13:36:21 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/b44ec48d9425
changeset: 12658:b44ec48d9425
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Mar 05 13:36:19 2011 +0200
description:
auth: Fixed ldap assert-crash.

diffstat:

 src/auth/db-ldap.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (22 lines):

diff -r d757b13d84ff -r b44ec48d9425 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Fri Mar 04 21:21:37 2011 +0200
+++ b/src/auth/db-ldap.c	Sat Mar 05 13:36:19 2011 +0200
@@ -1174,12 +1174,12 @@
 	const char *p;
 
 	while (ctx->attr != NULL) {
-		/* a new attribute */
-		db_ldap_result_change_attr(ctx);
-
-		if (ctx->vals != NULL) {
-			db_ldap_result_return_value(ctx);
-			return TRUE;
+		if (ctx->vals == NULL) {
+			db_ldap_result_change_attr(ctx);
+			if (ctx->vals != NULL) {
+				db_ldap_result_return_value(ctx);
+				return TRUE;
+			}
 		}
 
 		ldap_value_free(ctx->vals); ctx->vals = NULL;


More information about the dovecot-cvs mailing list