82806daf7d
from maintainer William Yodlowsky <bsd@openbsd.rutgers.edu>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
$OpenBSD: patch-ktcheck_c,v 1.1 2005/01/26 00:33:30 pvalchev Exp $
|
|
--- ktcheck.c.orig Thu Jan 20 13:09:09 2005
|
|
+++ ktcheck.c Thu Jan 20 13:05:02 2005
|
|
@@ -95,7 +95,7 @@ getstat( SNET *sn, char *description, ch
|
|
fprintf( stderr, "%s: line too long\n", line );
|
|
return( -1 );
|
|
}
|
|
- strcpy( stats, line );
|
|
+ (void)strlcpy( stats, line, MAXPATHLEN );
|
|
|
|
if ( verbose ) printf( "<<< %s\n", stats );
|
|
|
|
@@ -253,7 +253,7 @@ check( SNET *sn, char *type, char *file
|
|
fprintf( stderr, "%s: too long\n", type );
|
|
return( 2 );
|
|
}
|
|
- strcpy( pathdesc, type );
|
|
+ (void)strlcpy( pathdesc, type, sizeof( pathdesc ) );
|
|
|
|
file = base_kfile;
|
|
|
|
@@ -262,7 +262,7 @@ check( SNET *sn, char *type, char *file
|
|
fprintf( stderr, "%s: path too long\n", base_kfile );
|
|
return( 2 );
|
|
}
|
|
- strcpy( path, base_kfile );
|
|
+ (void)strlcpy( path, base_kfile, sizeof( path ) );
|
|
}
|
|
|
|
if ( getstat( sn, (char *)&pathdesc, stats ) != 0 ) {
|
|
@@ -505,7 +505,7 @@ main( int argc, char **argv )
|
|
p++;
|
|
*p = (char)'\0';
|
|
}
|
|
- strcpy( path, base_kfile );
|
|
+ (void)strlcpy( path, base_kfile, sizeof( path ) );
|
|
|
|
if (( sn = connectsn( host, port )) == NULL ) {
|
|
exit( 2 );
|