From: Howard Chu Date: Sat, 12 Apr 2003 12:20:19 +0000 (+0000) Subject: Tweak strcpy's X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~376 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=088eecc34d715e1762b257ca9b8b3736e804ec1f;p=openldap Tweak strcpy's --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index cc3e7c1674..569e995ccb 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -17,6 +17,7 @@ #include "ldap_pvt.h" #include "slap.h" +#include "lutil.h" typedef struct Attr_option { struct berval name; /* option name or prefix */ @@ -352,16 +353,13 @@ done:; j = (lp ? lp - desc.ad_tags.bv_val - 1 : strlen( desc.ad_tags.bv_val )); - strncpy(cp, desc.ad_tags.bv_val, j); - cp += j; + cp = lutil_strncopy(cp, desc.ad_tags.bv_val, j); } } - strcpy(cp, ";binary"); - cp += sizeof(";binary")-1; + cp = lutil_strcopy(cp, ";binary"); if( lp != NULL ) { *cp++ = ';'; - strcpy(cp, lp); - cp += strlen( cp ); + cp = lutil_strcopy(cp, lp); } d2->ad_cname.bv_len = cp - d2->ad_cname.bv_val; if( desc.ad_tags.bv_len )