ITS#7762 shortcut NULL RDNs

This commit is contained in:
Howard Chu 2013-12-11 04:41:48 -08:00
parent 26ce222b6a
commit 79b12f2f93

View File

@ -2987,7 +2987,7 @@ int ldap_dn2bv_x( LDAPDN dn, struct berval *bv, unsigned flags, void *ctx )
* a null dn means an empty dn string * a null dn means an empty dn string
* FIXME: better raise an error? * FIXME: better raise an error?
*/ */
if ( dn == NULL ) { if ( dn == NULL || dn[0] == NULL ) {
bv->bv_val = LDAP_STRDUPX( "", ctx ); bv->bv_val = LDAP_STRDUPX( "", ctx );
return( LDAP_SUCCESS ); return( LDAP_SUCCESS );
} }