Skip to content
Snippets Groups Projects
Commit 8d5bcf05 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )'

parent d59de0c5
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
......
......@@ -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 );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment