$OpenBSD: patch-lapply_c,v 1.2 2005/01/26 00:33:30 pvalchev Exp $
--- lapply.c.orig	Thu Dec 16 16:50:35 2004
+++ lapply.c	Thu Jan 20 12:57:27 2005
@@ -75,7 +75,7 @@ create_node( char *path, char *tline )
     new_node = (struct node *) malloc( sizeof( struct node ));
     new_node->path = strdup( path );
     if ( tline != NULL ) {
-	sprintf( new_node->tline, "%s", tline );
+	(void)snprintf( new_node->tline, sizeof( new_node->tline ), "%s", tline );
 	new_node->doline = 1;
     } else {
 	new_node->doline = 0;
@@ -126,7 +126,7 @@ do_line( char *tline, int present, struc
 	fprintf( stderr, "line %d: too long\n", linenum );
 	return( 1 );
     } 
-    strcpy( path, d_path );
+    (void)strlcpy( path, d_path, sizeof( path ) );
 
     /* DOWNLOAD */
     if ( *command == '+' ) {
@@ -135,7 +135,7 @@ do_line( char *tline, int present, struc
 		    linenum, *targv[ 0 ] );
 	    return( 1 );
 	}
-	strcpy( cksum_b64, targv[ 7 ] );
+	(void)strlcpy( cksum_b64, targv[ 7 ], sizeof( cksum_b64 ) );
 
 	if ( special ) {
 	    if ( snprintf( pathdesc, MAXPATHLEN * 2, "SPECIAL %s",
@@ -415,7 +415,7 @@ main( int argc, char **argv )
 	    fprintf( stderr, "line %d: too long\n", linenum );
 	    goto error2;
 	}
-	strcpy( targvline, tline );
+	(void)strlcpy( targvline, tline, sizeof( targvline ) );
 
 	tac = acav_parse( acav, targvline, &targv );
 
@@ -425,7 +425,7 @@ main( int argc, char **argv )
         }
 
 	if ( tac == 1 ) {
-	    strcpy( transcript, targv[ 0 ] );
+	    (void)strlcpy( transcript, targv[ 0 ], sizeof( transcript ) );
 	    len = strlen( transcript );
 	    if ( transcript[ len - 1 ] != ':' ) { 
 		fprintf( stderr, "%s: line %d: invalid transcript name\n",
@@ -467,7 +467,7 @@ main( int argc, char **argv )
 	    fprintf( stderr, "line %d: too long\n", linenum );
 	    return( 1 );
 	} 
-	strcpy( path, d_path );
+	(void)strlcpy( path, d_path, sizeof( path ) );
 
 	/* Check transcript order */
 	if ( prepath != 0 ) {
@@ -482,7 +482,7 @@ main( int argc, char **argv )
 		    transcript, linenum );
 	    goto error2;
 	}
-	strcpy( prepath, path );
+	(void)strlcpy( prepath, path, sizeof( prepath ) );
 
 	/* Do type check on local file */
 	switch ( radstat( path, &st, &fstype, &afinfo )) {
