From 79b12f2f93aadccf41024f3985b68223beba12f6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 11 Dec 2013 04:41:48 -0800 Subject: [PATCH] ITS#7762 shortcut NULL RDNs --- libraries/libldap/getdn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } -- 2.39.5