mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Add embedded NUL check. This is one case where we don't want to
be liberal in what we accept.
This commit is contained in:
parent
ee6d1a4d40
commit
dd12660a14
1 changed files with 7 additions and 2 deletions
|
|
@ -650,8 +650,10 @@ ldap_bv2dn( struct berval *bv, LDAPDN **dn, unsigned flags )
|
|||
|
||||
if ( bv->bv_len == 0 ) {
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
} else if ( str[ 0 ] == '\0' ) {
|
||||
if( strlen( bv->bv_val ) != bv->bv_len ) {
|
||||
/* value must have embedded NULs */
|
||||
return LDAP_DECODING_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -879,7 +881,10 @@ ldap_bv2rdn( struct berval *bv, LDAPRDN **rdn,
|
|||
if ( bv->bv_len == 0 ) {
|
||||
return LDAP_SUCCESS;
|
||||
|
||||
} else if ( str[ 0 ] == '\0' ) {
|
||||
}
|
||||
|
||||
if( strlen( bv->bv_val ) != bv->bv_len ) {
|
||||
/* value must have embedded NULs */
|
||||
return LDAP_DECODING_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue