From: Kurt Zeilenga Date: Mon, 28 Jun 1999 22:47:20 +0000 (+0000) Subject: Allow ctrls argument to be NULL. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~227 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=64d5725662d33a168055df6db2ea06c366a1d0f1;p=openldap Allow ctrls argument to be NULL. --- diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index b609b7bc56..a5efc952dc 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -117,8 +117,10 @@ int ldap_int_get_controls( char *opaque; assert( ber != NULL ); - assert( ctrls != NULL ); + if( ctrls == NULL ) { + return LDAP_SUCCESS; + } *ctrls = NULL; len = ber_pvt_ber_remaining(ber); @@ -128,6 +130,7 @@ int ldap_int_get_controls( return LDAP_SUCCESS; } + if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) { if( tag == LBER_ERROR ) { /* decoding error */