Skip to content
Snippets Groups Projects
Commit 2a2d6cc9 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add embedded NUL checks, fix last commit

parent 7c962f3d
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment