Re: [PATCH] wldap32: Properly implement ldap_encode_sort_control[A,W] (Coverity)
23 Nov
2015
23 Nov
'15
8:43 a.m.
On Sun, 2015-11-22 at 15:31 +0300, Nikolay Sivov wrote:
ULONG CDECL ldap_encode_sort_controlA( WLDAP32_LDAP *ld, PLDAPSortKeyA *sortkeys, - PLDAPControlA control, BOOLEAN critical ) + PLDAPControlA ret, BOOLEAN critical ) { - return ldap_create_sort_controlA( ld, sortkeys, critical, &control ); + LDAPControlA *control; + ULONG result; + + if ((result = ldap_create_sort_controlA( ld, sortkeys, critical, &control )) == WLDAP32_LDAP_SUCCESS) + { + ret->ldctl_oid = strdupU(control->ldctl_oid); + ret->ldctl_value.bv_len = control->ldctl_value.bv_len; + ret->ldctl_value.bv_val = strdupU(control->ldctl_value.bv_val);
bv_val is not a string. Otherwise the patch looks good.
3675
Age (days ago)
3675
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hans Leidekker