5df8721a25
from William Yodlowsky (MAINTAINER)
24 lines
760 B
Plaintext
24 lines
760 B
Plaintext
$OpenBSD: patch-repo_c,v 1.2 2007/09/09 20:02:09 jasper Exp $
|
|
--- repo.c.orig Tue Jul 31 04:55:37 2007
|
|
+++ repo.c Sun Sep 9 21:59:55 2007
|
|
@@ -173,7 +173,7 @@ main( int argc, char *argv[] )
|
|
fprintf( stderr, "%s: too long\n", argv[ optind ] );
|
|
exit( 2 );
|
|
}
|
|
- strcpy( repodata, argv[ optind ] );
|
|
+ (void)strlcpy( repodata, argv[ optind ], sizeof( repodata ) );
|
|
|
|
/* Skip first token in message */
|
|
i = 1;
|
|
@@ -183,8 +183,8 @@ main( int argc, char *argv[] )
|
|
fprintf( stderr, "%s %s: too long\n", repodata, argv[ i ] );
|
|
exit( 2 );
|
|
}
|
|
- strcat( repodata, " " );
|
|
- strcat( repodata, argv[ i ] );
|
|
+ (void)strlcat( repodata, " ", sizeof( repodata ) );
|
|
+ (void)strlcat( repodata, argv[ i ], sizeof( repodata ) );
|
|
}
|
|
}
|
|
|