From 8d5bcf056d210c6b90ac44417cc4d96aa0d1622d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 27 Dec 1998 06:29:45 +0000 Subject: [PATCH] Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )' --- clients/ud/print.c | 2 +- clients/ud/util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ); } } -- 2.39.5