From: Hallvard Furuseth Date: Sun, 27 Dec 1998 06:29:45 +0000 (+0000) Subject: Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )' X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~858 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8d5bcf056d210c6b90ac44417cc4d96aa0d1622d;p=openldap Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )' --- diff --git a/clients/ud/print.c b/clients/ud/print.c index ba665222b1..ad62c50a4c 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -569,7 +569,7 @@ time2text( char *ldtimestr, int dateonly ) timestr[ strlen( timestr ) - 1 ] = zone; /* replace trailing newline */ if ( dateonly ) { - strcpy( timestr + 11, timestr + 20 ); + SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 ); } Free ( ldtimestr ); diff --git a/clients/ud/util.c b/clients/ud/util.c index b75b5ff6f8..c50a60cd76 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -206,7 +206,7 @@ fetch_buffer( char *buffer, int length, FILE *where ) if ( isprint( *p )) { ++p; } else { - strcpy( p, p + 1 ); + SAFEMEMCPY( p, p + 1, strlen( p + 1 ) + 1 ); } }