mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Change overlapping strcpy( x, y )' to SAFEMEMCPY( x, y, strlen( y ) + 1 )'
This commit is contained in:
parent
c3a692787c
commit
521f6cfda9
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue