Module: wine Branch: master Commit: 6df25aafbb2999de30f17308cd516c509abeb05b URL: https://source.winehq.org/git/wine.git/?a=commit;h=6df25aafbb2999de30f17308c...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Mon Apr 6 18:11:39 2020 +0800
wldap32: Fix server controls lookup logic.
This fixes 'supported == user_count' comparison if the server has duplicate control OIDs in the returned list.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wldap32/option.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index 87eb779953..cf948bf037 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -439,10 +439,15 @@ static BOOL is_supported_server_ctrls( WLDAP32_LDAP *ld, LDAPControl **ctrls )
for (n = 0; n < user_count; n++) { + TRACE("looking for %s\n", debugstr_a(ctrls[n]->ldctl_oid)); + for (i = 0; i < server_count; i++) { if (!strncmp( ctrls[n]->ldctl_oid, ld->ld_server_ctrls[i]->bv_val, ld->ld_server_ctrls[i]->bv_len)) + { supported++; + break; + } } }