From: Howard Chu Date: Tue, 8 Dec 2009 11:59:29 +0000 (+0000) Subject: Fix unparse in prev commit X-Git-Tag: ACLCHECK_0~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c79267b88aa70396f55c9368849ee70411c0ef79;p=openldap Fix unparse in prev commit --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 3f8388293d..1d44f94a79 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -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