]> git.sur5r.net Git - openldap/commitdiff
ITS#2970 fix build_new_dn for zero-length parent DN
authorHoward Chu <hyc@openldap.org>
Thu, 26 Feb 2004 02:58:12 +0000 (02:58 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 26 Feb 2004 02:58:12 +0000 (02:58 +0000)
servers/slapd/dn.c

index d9a6c913b02dfb4ceafa8bf5a96fab7ba5121476..a1b881bf1a4b52c23c127b0c55cea3bf8ef810f9 100644 (file)
@@ -843,7 +843,7 @@ build_new_dn( struct berval * new_dn,
 {
        char *ptr;
 
-       if ( parent_dn == NULL ) {
+       if ( parent_dn == NULL || parent_dn->bv_len == 0 ) {
                ber_dupbv( new_dn, newrdn );
                return;
        }