ldap_memfree( at->at_syntax_oid );
at->at_syntax_oid = oid;
}
-
}
if ( at->at_names && at->at_names[0] ) {
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,
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: "