/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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 );
}