openbsd-ports/sysutils/radmind/patches/patch-ktcheck_c
jasper 5df8721a25 update radmind to 1.10.0
from William Yodlowsky (MAINTAINER)
2007-09-09 20:02:09 +00:00

49 lines
1.5 KiB
Plaintext

$OpenBSD: patch-ktcheck_c,v 1.4 2007/09/09 20:02:09 jasper Exp $
--- ktcheck.c.orig Tue Jul 31 04:55:36 2007
+++ ktcheck.c Sun Sep 9 21:59:53 2007
@@ -240,7 +240,7 @@ clean_client_dir( void )
* can't pass in kdir, since it has a trailing slash.
* bounds checking done when creating kdir in main().
*/
- strcpy( dir, kdir );
+ (void)strlcpy( dir, kdir, sizeof( dir ) );
if (( p = strrchr( dir, '/' )) != NULL ) {
*p = '\0';
}
@@ -284,7 +284,7 @@ getstat( SNET *sn, char *description, char *stats )
fprintf( stderr, "%s: line too long\n", line );
return( -1 );
}
- strcpy( stats, line );
+ (void)strlcpy( stats, line, MAXPATHLEN );
if ( verbose ) printf( "<<< %s\n", stats );
@@ -435,7 +435,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;
@@ -444,7 +444,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 ) {
@@ -712,7 +712,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 );