From c79267b88aa70396f55c9368849ee70411c0ef79 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 8 Dec 2009 11:59:29 +0000 Subject: [PATCH] Fix unparse in prev commit --- servers/slapd/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5