Skip to content
Snippets Groups Projects
Commit 64d57256 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Allow ctrls argument to be NULL.

parent 5045f15b
Branches
Tags
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment