Skip to content

Commit bb2e781

Browse files
committed
Backport r1926954
apr_ldap: Reset apr_ldap_bind_interact_t each time in case the callback misbehaves. git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1926955 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2341e69 commit bb2e781

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ldap/apr_ldap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2692,10 +2692,12 @@ APU_DECLARE_LDAP(apr_status_t) apr_ldap_bind(apr_pool_t *pool, apr_ldap_t *ldap,
26922692
const char *dn;
26932693
struct berval cred;
26942694

2695-
apr_ldap_bind_interact_t interaction = { 0 };
2695+
apr_ldap_bind_interact_t interaction;
26962696

26972697
memset(err, 0, sizeof(*err));
26982698

2699+
memset(&interaction, 0, sizeof(apr_ldap_bind_interact_t));
2700+
26992701
interaction.id = APR_LDAP_INTERACT_DN;
27002702
interaction.prompt = "Distinguished Name";
27012703

@@ -2717,6 +2719,8 @@ APU_DECLARE_LDAP(apr_status_t) apr_ldap_bind(apr_pool_t *pool, apr_ldap_t *ldap,
27172719
dn = "";
27182720
}
27192721

2722+
memset(&interaction, 0, sizeof(apr_ldap_bind_interact_t));
2723+
27202724
interaction.id = APR_LDAP_INTERACT_PASS;
27212725
interaction.prompt = "Password";
27222726

0 commit comments

Comments
 (0)