Validate session handle

This commit is contained in:
Kurt Zeilenga 2000-10-18 16:32:57 +00:00
parent 895296fbd3
commit 3498151f99
2 changed files with 9 additions and 0 deletions

View file

@ -96,6 +96,9 @@ ldap_search_ext(
Debug( LDAP_DEBUG_TRACE, "ldap_search_ext\n", 0, 0, 0 );
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
/*
* if timeout is provided, both tv_sec and tv_usec must
* be non-zero
@ -207,6 +210,9 @@ ldap_search(
Debug( LDAP_DEBUG_TRACE, "ldap_search\n", 0, 0, 0 );
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
ber = ldap_build_search_req( ld, base, scope, filter, attrs,
attrsonly, NULL, NULL, -1, -1 );

View file

@ -877,6 +877,9 @@ ldap_url_search( LDAP *ld, LDAP_CONST char *url, int attrsonly )
BerElement *ber;
LDAPreqinfo bind;
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
if ( ldap_url_parse( url, &ludp ) != 0 ) {
ld->ld_errno = LDAP_PARAM_ERROR;
return( -1 );