From: Kurt Zeilenga Date: Wed, 18 Oct 2000 16:32:57 +0000 (+0000) Subject: Validate session handle X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1703 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3498151f9914a2faee6ed34648690d8672be8506;p=openldap Validate session handle --- diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 4f028b0b1e..2d20710302 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -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 ); diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 652048a31e..8da394051d 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -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 );