From 7c962f3dd4b439e8a84a71062284ca2ce2d32b52 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 13 Feb 2002 09:20:07 +0000 Subject: [PATCH] dnValidate needs to check for embedded NULs. --- servers/slapd/dn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 812a2a0b09..c88b5e07c3 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -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 ); /* -- 2.39.5