Fix prev commit

This commit is contained in:
Howard Chu 2009-06-30 11:54:45 +00:00
parent b50f9c7aa9
commit 98ebf1950e

View File

@ -592,6 +592,9 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
assert( cred != NULL ); assert( cred != NULL );
assert( pp != NULL ); assert( pp != NULL );
assert( txt != NULL );
*txt = NULL;
if ((cred->bv_len == 0) || (pp->pwdMinLength > cred->bv_len)) { if ((cred->bv_len == 0) || (pp->pwdMinLength > cred->bv_len)) {
rc = LDAP_CONSTRAINT_VIOLATION; rc = LDAP_CONSTRAINT_VIOLATION;
@ -658,7 +661,6 @@ check_password_quality( struct berval *cred, PassPolicy *pp, LDAPPasswordPolicyE
pp->pwdCheckModule, err, 0 ); pp->pwdCheckModule, err, 0 );
ok = LDAP_OTHER; ok = LDAP_OTHER;
} else { } else {
*txt = NULL;
ldap_pvt_thread_mutex_lock( &chk_syntax_mutex ); ldap_pvt_thread_mutex_lock( &chk_syntax_mutex );
ok = prog( ptr, txt, e ); ok = prog( ptr, txt, e );
ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex ); ldap_pvt_thread_mutex_unlock( &chk_syntax_mutex );