From 0145d54325674942cc1752d0e82d20e237da4f2f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 29 Nov 2004 04:03:56 +0000 Subject: [PATCH] In build_new_dn, rdn may be part of a larger string, use strncopy. --- servers/slapd/dn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 151d6d35ce..42d4be5990 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -1299,7 +1299,7 @@ build_new_dn( struct berval * new_dn, new_dn->bv_len = parent_dn->bv_len + newrdn->bv_len + 1; new_dn->bv_val = (char *) slap_sl_malloc( new_dn->bv_len + 1, memctx ); - ptr = lutil_strcopy( new_dn->bv_val, newrdn->bv_val ); + ptr = lutil_strncopy( new_dn->bv_val, newrdn->bv_val, newrdn->bv_len ); *ptr++ = ','; strcpy( ptr, parent_dn->bv_val ); } -- 2.39.5