Quick (and expensive) fix to detect DNs with embedded NULs

This commit is contained in:
Kurt Zeilenga 2002-02-13 04:20:11 +00:00
parent fcf835558e
commit b2d948f0e5

View File

@ -470,6 +470,11 @@ dnPrettyNormal(
pretty->bv_len = 0;
normal->bv_len = 0;
/* 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 ) {