benign buffer overflow fix (ITS#1964)

This commit is contained in:
Kurt Zeilenga 2002-09-25 04:34:33 +00:00
parent ba6d2c5cc0
commit b4e1ea15f3
3 changed files with 4 additions and 4 deletions

View file

@ -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] ) {

View file

@ -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,

View file

@ -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: "