X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fgetdn.c;h=701c9640ee6cb73567b373b7b3958ef5b3c71eac;hb=10566c8be384c6435476ec54e842382841cb84b6;hp=c69882e89f52b7b590d1b0c9f210e21f4468e7a9;hpb=510584db896c2b12f28bbd90c1114e836fc8d3f1;p=openldap diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index c69882e89f..701c9640ee 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * 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 @@ -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 ); } @@ -3198,7 +3198,7 @@ int ldap_dn2bv_x( LDAPDN dn, struct berval *bv, unsigned flags, void *ctx ) * Sort of UFN for DCE DNs: a slash ('/') separated * global->local DN with no types; strictly speaking, * the naming context should be a domain, which is - * written in DNS-style, e.g. dot-deparated. + * written in DNS-style, e.g. dot-separated. * * Example: *