]> git.sur5r.net Git - openldap/commitdiff
ITS#6338: Fix \0-termination of dnParent(x, x) for one-level DN x.
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 19 Oct 2009 23:51:08 +0000 (23:51 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 19 Oct 2009 23:51:08 +0000 (23:51 +0000)
servers/slapd/dn.c

index 35051299e6792272665f81ee669cfb5b1a6df6e3..3534e7ff9f8e0380194b8d889b330785f9b5421c 100644 (file)
@@ -964,8 +964,8 @@ dnParent(
 
        /* one-level dn */
        if ( p == NULL ) {
-               pdn->bv_len = 0;
                pdn->bv_val = dn->bv_val + dn->bv_len;
+               pdn->bv_len = 0;
                return;
        }