From: Kurt Zeilenga Date: Wed, 13 Feb 2002 09:26:25 +0000 (+0000) Subject: Add embedded NUL checks, fix last commit X-Git-Tag: OPENLDAP_REL_ENG_2_1_BP~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2a2d6cc93ed2320ecfea2bc49530e2dc83ad2719;p=openldap Add embedded NUL checks, fix last commit --- diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index c88b5e07c3..f871e38ce7 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -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 ) {