]> git.sur5r.net Git - openldap/commitdiff
ITS#5511
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 27 May 2008 22:16:35 +0000 (22:16 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 27 May 2008 22:16:35 +0000 (22:16 +0000)
CHANGES
servers/slapd/overlays/unique.c

diff --git a/CHANGES b/CHANGES
index db2212f7c260e67061f7d0560ef78c0d47863b9e..0e74f3565046982e742712324c8f6d13d811e4d3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@ OpenLDAP 2.4.10 Engineering
        Fixed slapo-syncprov op2.o_extra reset (ITS#5501, #5506)
        Fixed slapo-syncprov sending ops without queued CSNs (ITS#5465)
        Fixed slapo-unique config structs (ITS#5526)
+       Fixed slapo-unique filter terminator (ITS#5511)
        Documentation
                Add search privileges documentation (ITS#5512)
 
index 037ceeccde764c3e769ce1a2a96de991a01e8eaa..8866660825ac9d1282aaede7c2e1df393a3c8c68 100644 (file)
@@ -250,7 +250,6 @@ unique_new_domain_uri ( unique_domain_uri **urip,
                filter_free( f );
        }
 exit:
-       if ( bv.bv_val ) ber_memfree ( bv.bv_val );
        uri->next = *urip;
        *urip = uri;
        if ( rc ) {
@@ -1058,6 +1057,9 @@ unique_add(
                        /* skip this domain-uri if it isn't involved */
                        if ( !ks ) continue;
 
+                       /* terminating NUL */
+                       ks++;
+
                        if ( uri->filter.bv_val && uri->filter.bv_len )
                                ks += uri->filter.bv_len + STRLENOF ("(&)");
                        kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);
@@ -1166,6 +1168,9 @@ unique_modify(
                        /* skip this domain-uri if it isn't involved */
                        if ( !ks ) continue;
 
+                       /* terminating NUL */
+                       ks++;
+
                        if ( uri->filter.bv_val && uri->filter.bv_len )
                                ks += uri->filter.bv_len + STRLENOF ("(&)");
                        kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);
@@ -1299,6 +1304,9 @@ unique_modrdn(
                        /* skip this domain if it isn't involved */
                        if ( !ks ) continue;
 
+                       /* terminating NUL */
+                       ks++;
+
                        if ( uri->filter.bv_val && uri->filter.bv_len )
                                ks += uri->filter.bv_len + STRLENOF ("(&)");
                        kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);