From: Howard Chu Date: Wed, 11 Dec 2013 12:41:48 +0000 (-0800) Subject: ITS#7762 shortcut NULL RDNs X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79b12f2f93aadccf41024f3985b68223beba12f6;p=openldap ITS#7762 shortcut NULL RDNs --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index c69882e89f..5bfb223239 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -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 * FIXME: better raise an error? */ - if ( dn == NULL ) { + if ( dn == NULL || dn[0] == NULL ) { bv->bv_val = LDAP_STRDUPX( "", ctx ); return( LDAP_SUCCESS ); }