Skip to content
Snippets Groups Projects
Commit b4e1ea15 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

benign buffer overflow fix (ITS#1964)

parent ba6d2c5c
No related branches found
No related tags found
No related merge requests found
......@@ -338,7 +338,6 @@ at_add(
ldap_memfree( at->at_syntax_oid );
at->at_syntax_oid = oid;
}
}
if ( at->at_names && at->at_names[0] ) {
......
......@@ -28,7 +28,8 @@ lock_fopen( const char *fname, const char *type, FILE **lfp )
char buf[MAXPATHLEN];
/* open the lock file */
strcpy(lutil_strcopy( buf, fname ), ".lock" );
snprintf( buf, sizeof buf, "%s.lock", fname );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
......
......@@ -47,8 +47,8 @@ lock_fopen(
char buf[MAXPATHLEN];
/* open the lock file */
strcpy( buf, fname );
strcat( buf, ".lock" );
snprintf( buf, sizeof buf, "%s.lock", fname );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG ( SLURPD, ERR, "lock_fopen: "
......
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