Skip to content
Snippets Groups Projects
Commit 658c99d1 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#5817

parent ea30afb7
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ OpenLDAP 2.4 Change Log
OpenLDAP 2.4.13 Release (2008/11/20)
Added libldap dereference control support (ITS#5768)
Fixed libldap parameter checking (ITS#5817)
Fixed liblutil hex conversion (ITS#5699)
Fixed liblutil returning undefined data (ITS#5748)
Fixed libldap error code return (ITS#5762)
......
......@@ -151,9 +151,32 @@ ldap_add_ext(
/* for each attribute in the entry... */
for ( i = 0; attrs[i] != NULL; i++ ) {
if ( ( attrs[i]->mod_op & LDAP_MOD_BVALUES) != 0 ) {
int j;
if ( attrs[i]->mod_bvalues == NULL ) {
ld->ld_errno = LDAP_PARAM_ERROR;
ber_free( ber, 1 );
return ld->ld_errno;
}
for ( j = 0; attrs[i]->mod_bvalues[ j ] != NULL; j++ ) {
if ( attrs[i]->mod_bvalues[ j ]->bv_val == NULL ) {
ld->ld_errno = LDAP_PARAM_ERROR;
ber_free( ber, 1 );
return ld->ld_errno;
}
}
rc = ber_printf( ber, "{s[V]N}", attrs[i]->mod_type,
attrs[i]->mod_bvalues );
} else {
if ( attrs[i]->mod_values == NULL ) {
ld->ld_errno = LDAP_PARAM_ERROR;
ber_free( ber, 1 );
return ld->ld_errno;
}
rc = ber_printf( ber, "{s[v]N}", attrs[i]->mod_type,
attrs[i]->mod_values );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment