return LDAP_PARAM_ERROR;
}
- if ( str[ 0 ] == '\0' ) {
+ if ( bv->bv_len == 0 ) {
return LDAP_SUCCESS;
+
+ } else if ( str[ 0 ] == '\0' ) {
+ return LDAP_DECODING_ERROR;
}
p = str;
return LDAP_PARAM_ERROR;
}
- if ( str[ 0 ] == '\0' ) {
+ if ( bv->bv_len == 0 ) {
return LDAP_SUCCESS;
+
+ } else if ( str[ 0 ] == '\0' ) {
+ return LDAP_DECODING_ERROR;
}
p = str;
}
rc = ldap_bv2dn( in, &dn, LDAP_DN_FORMAT_LDAP );
+ if ( rc != LDAP_SUCCESS ) {
+ return LDAP_INVALID_SYNTAX;
+ }
+
+ assert( strlen( in->bv_val ) == in->bv_len );
/*
* Schema-aware validate
*/
+ rc = LDAPDN_validate( dn );
if ( rc == LDAP_SUCCESS ) {
- rc = LDAPDN_validate( dn );
ldap_dnfree( dn );
}
- if ( rc != LDAP_SUCCESS ) {
- return( LDAP_INVALID_SYNTAX );
- }
-
- return( LDAP_SUCCESS );
+ return LDAP_INVALID_SYNTAX;
}
/*
return LDAP_INVALID_SYNTAX;
}
+ assert( strlen( val->bv_val ) == val->bv_len );
+
/*
* Schema-aware rewrite
*/
return LDAP_INVALID_SYNTAX;
}
+ assert( strlen( val->bv_val ) == val->bv_len );
+
/*
* Schema-aware rewrite
*/
return LDAP_INVALID_SYNTAX;
}
+ assert( strlen( val->bv_val ) == val->bv_len );
+
/*
* Schema-aware rewrite
*/