mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 06:01:23 -05:00
Change overlapping strcpy( x, y )' to SAFEMEMCPY( x, y, strlen( y ) + 1 )'
This commit is contained in:
parent
d59de0c50f
commit
8d5bcf056d
2 changed files with 2 additions and 2 deletions
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue