Add embedded NUL checks, fix last commit

This commit is contained in:
Kurt Zeilenga 2002-02-13 09:26:25 +00:00
parent 7c962f3dd4
commit 2a2d6cc93e

View file

@ -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 ) {