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

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

parent c3a69278
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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