diff options
author | nakai <nakai@FreeBSD.org> | 2000-01-23 16:00:14 +0800 |
---|---|---|
committer | nakai <nakai@FreeBSD.org> | 2000-01-23 16:00:14 +0800 |
commit | 823028bc36d2c85f6fd21a48d4c8134a5d5e5a7d (patch) | |
tree | ba983354c563286f915845b7a90396d57d02cc8c /games | |
parent | 91e9dd0e6ab78628288e35ac7d34c10a78414df2 (diff) | |
download | freebsd-ports-gnome-823028bc36d2c85f6fd21a48d4c8134a5d5e5a7d.tar.gz freebsd-ports-gnome-823028bc36d2c85f6fd21a48d4c8134a5d5e5a7d.tar.zst freebsd-ports-gnome-823028bc36d2c85f6fd21a48d4c8134a5d5e5a7d.zip |
Rechange strncpy to strlcpy.
When you can't find strlcpy, update your FreeBSD... :)
Submitted by: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/xsoldier/files/patch-ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/xsoldier/files/patch-ac b/games/xsoldier/files/patch-ac index 60a9ee80e3d9..292382939991 100644 --- a/games/xsoldier/files/patch-ac +++ b/games/xsoldier/files/patch-ac @@ -5,7 +5,7 @@ else argv0 = argv[0]; - strcpy(command,argv0); /*** コマンド名取得とコピー ***/ -+ strncpy(command,argv0,sizeof(command)); /*** コマンド名取得とコピー ***/ ++ strlcpy(command,argv0,sizeof(command)); /*** コマンド名取得とコピー ***/ for (i=1; i<argc; i++) { @@ -13,7 +13,7 @@ { if (i < argc-1) - strcpy(display,argv[i+1]); -+ strncpy(display,argv[i+1],sizeof(display)); ++ strlcpy(display,argv[i+1],sizeof(display)); } else if ((strcmp(argv[i],"-wait")==0) || (strcmp(argv[i],"-w")==0)) { |