]> git.sur5r.net Git - openldap/commitdiff
Fix unparse in prev commit
authorHoward Chu <hyc@openldap.org>
Tue, 8 Dec 2009 11:59:29 +0000 (11:59 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 8 Dec 2009 11:59:29 +0000 (11:59 +0000)
servers/slapd/config.c

index 3f8388293defa4dd7c3c85fb3556896c5ba937d4..1d44f94a792e90879006f9306cc42ac069c9d2d8 100644 (file)
@@ -1303,7 +1303,10 @@ slap_sb_uri(
 {
        slap_bindconf *bc = bcp;
        if ( unparse ) {
-               *val = bc->sb_uri;
+               if ( bc->sb_uri.bv_len >= val->bv_len )
+                       return -1;
+               val->bv_len = bc->sb_uri.bv_len;
+               AC_MEMCPY( val->bv_val, bc->sb_uri.bv_val, val->bv_len );
        } else {
                bc->sb_uri = *val;
 #ifdef HAVE_TLS