Skip to content

Commit 6f47453

Browse files
committed
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/trunk@1926954 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2ce7b53 commit 6f47453

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ldap/apr_ldap.c

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

2715-
apr_ldap_bind_interact_t interaction = { 0 };
2715+
apr_ldap_bind_interact_t interaction;
27162716

27172717
memset(err, 0, sizeof(*err));
27182718

2719+
memset(&interaction, 0, sizeof(apr_ldap_bind_interact_t));
2720+
27192721
interaction.id = APR_LDAP_INTERACT_DN;
27202722
interaction.prompt = "Distinguished Name";
27212723

@@ -2737,6 +2739,8 @@ APU_DECLARE_LDAP(apr_status_t) apr_ldap_bind(apr_pool_t *pool, apr_ldap_t *ldap,
27372739
dn = "";
27382740
}
27392741

2742+
memset(&interaction, 0, sizeof(apr_ldap_bind_interact_t));
2743+
27402744
interaction.id = APR_LDAP_INTERACT_PASS;
27412745
interaction.prompt = "Password";
27422746

0 commit comments

Comments
 (0)