From: Hallvard Furuseth Date: Sun, 27 Dec 1998 02:15:08 +0000 (+0000) Subject: Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )' X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~862 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=521f6cfda933541af2e6a933e8c970f77dee9833;p=openldap Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )' --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index d634274674..96a667ff11 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -423,7 +423,7 @@ process_ldapmod_rec( char *rbuf ) rbuf = NULL; } else { if ( *(p-1) == '\\' ) { /* lines ending in '\' are continued */ - strcpy( p - 1, p ); + SAFEMEMCPY( p - 1, p, strlen( p ) + 1 ); rbuf = p; continue; } diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index d56dc5799d..b2c34aee80 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -97,7 +97,8 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix, if ( (quote = strrchr( ufncomp[ncomp], '"' )) != NULL ) *quote = '\0'; - strcpy( ufncomp[ncomp], ufncomp[ncomp] + 1 ); + SAFEMEMCPY( ufncomp[ncomp], ufncomp[ncomp] + 1, + strlen( ufncomp[ncomp] + 1 ) + 1 ); } if ( ncomp == 0 ) phase = 3;