mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 19:19:35 -05:00
ITS#2010: use snprintf instead of strcpy to prevent buffer overflow
This commit is contained in:
parent
3f2faa1a84
commit
f1047b704e
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ filecheck(
|
|||
char *p;
|
||||
unsigned int ret = 0;
|
||||
|
||||
strcpy( dir, f );
|
||||
snprintf( dir, sizeof dir, "%s", f );
|
||||
p = strrchr( dir, LDAP_DIRSEP[0] );
|
||||
if ( p != NULL ) {
|
||||
*p = '\0';
|
||||
|
|
|
|||
Loading…
Reference in a new issue