1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/games/xsoldier/files/patch-ac
Yukihiro Nakai e9780e98f1 Fix the ports.
There is not 'strlcpy' function here or in system.
So I replaced to strncpy.

Submitted by:	Tsuguru Kato <tkato@prontomail.ne.jp>
2000-01-22 11:18:59 +00:00

20 lines
584 B
Plaintext

--- main.c Fri Feb 28 08:50:07 1997
+++ main.c.new Wed Dec 15 19:35:37 1999
@@ -129,14 +129,14 @@
argv0++;
else
argv0 = argv[0];
- strcpy(command,argv0); /*** コマンド名取得とコピー ***/
+ strncpy(command,argv0,sizeof(command)); /*** コマンド名取得とコピー ***/
for (i=1; i<argc; i++)
{
if ((strcmp(argv[i],"-display")==0) || (strcmp(argv[i],"-d")==0))
{
if (i < argc-1)
- strcpy(display,argv[i+1]);
+ strncpy(display,argv[i+1],sizeof(display));
}
else if ((strcmp(argv[i],"-wait")==0) || (strcmp(argv[i],"-w")==0))
{