Commit 658c99d1 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#5817

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