mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Add embedded NUL checks, fix last commit
This commit is contained in:
parent
7c962f3dd4
commit
2a2d6cc93e
1 changed files with 6 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ dnValidate(
|
|||
}
|
||||
|
||||
/* FIXME: str2dn should take a bv and handle this */
|
||||
if( strlen( val->bv_val ) != val->bv_len ) {
|
||||
if( strlen( in->bv_val ) != in->bv_len ) {
|
||||
return LDAP_INVALID_SYNTAX;
|
||||
}
|
||||
|
||||
|
|
@ -424,6 +424,11 @@ dnPretty2(
|
|||
LDAPDN *dn = NULL;
|
||||
int rc;
|
||||
|
||||
/* FIXME: str2dn should take a bv and handle this */
|
||||
if( strlen( val->bv_val ) != val->bv_len ) {
|
||||
return LDAP_INVALID_SYNTAX;
|
||||
}
|
||||
|
||||
/* FIXME: should be liberal in what we accept */
|
||||
rc = ldap_str2dn( val->bv_val, &dn, LDAP_DN_FORMAT_LDAP );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue