Commit c8078110 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wldap32: Handle null LDAPMessage in ldap_count_entries.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54690 (cherry picked from commit 65323a6b)
parent b9dfdaf0
......@@ -98,6 +98,7 @@ ULONG CDECL WLDAP32_ldap_count_entries( LDAP *ld, WLDAP32_LDAPMessage *res )
{
TRACE( "(%p, %p)\n", ld, res );
if (!res) return 0;
if (!ld) return ~0u;
return ldap_count_entries( CTX(ld), MSG(res) );
}
......
......@@ -252,7 +252,13 @@ static void test_ldap_paged_search(void)
ok( res != NULL, "expected res != NULL\n" );
ok( count == 0, "got %lu\n", count );
count = ldap_count_entries( ld, res);
count = ldap_count_entries( NULL, NULL );
ok( count == 0, "got %lu\n", count );
count = ldap_count_entries( ld, NULL );
ok( count == 0, "got %lu\n", count );
count = ldap_count_entries( NULL, res );
todo_wine ok( count == 1, "got %lu\n", count );
count = ldap_count_entries( ld, res );
ok( count == 1, "got %lu\n", count );
entry = ldap_first_entry( ld, res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment