]> git.sur5r.net Git - openldap/commitdiff
dnValidate needs to check for embedded NULs.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 13 Feb 2002 09:20:07 +0000 (09:20 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 13 Feb 2002 09:20:07 +0000 (09:20 +0000)
servers/slapd/dn.c

index 812a2a0b09c4850a0d5fa69975e43a70a0b7f6c2..c88b5e07c3fca6b852f1792a0fe68ac52229cbf7 100644 (file)
@@ -116,6 +116,11 @@ dnValidate(
                return( LDAP_SUCCESS );
        }
 
+       /* FIXME: str2dn should take a bv and handle this */
+       if( strlen( val->bv_val ) != val->bv_len ) {
+               return LDAP_INVALID_SYNTAX;
+       }
+
        rc = ldap_str2dn( in->bv_val, &dn, LDAP_DN_FORMAT_LDAP );
 
        /*