openbsd-ports/sysutils/radmind/patches/patch-ktcheck_c
2007-04-01 07:08:39 +00:00

40 lines
1.2 KiB
Plaintext

$OpenBSD: patch-ktcheck_c,v 1.2 2007/04/01 07:08:39 steven Exp $
--- ktcheck.c.orig Thu Feb 10 19:22:52 2005
+++ ktcheck.c Sun Apr 1 08:18:32 2007
@@ -95,7 +95,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 );
@@ -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 );