[PATCH] wldap32: Properly implement ldap_encode_sort_control[A,W] (Coverity)
Hans Leidekker
hans at codeweavers.com
Mon Nov 23 02:43:23 CST 2015
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.
More information about the wine-devel
mailing list