diff options
author | dholland <dholland@NetBSD.org> | 2009-05-26 00:30:16 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-05-26 00:30:16 +0000 |
commit | ae29a96c5994a7d98108cec38ab0547bd45690b2 (patch) | |
tree | 5adcb20001526a493e2c0fcb2865ffa73f83a54c | |
parent | 8053a125d99718a8c77d9ce35bc4d0c80119ec8f (diff) | |
download | bsdgames-darwin-ae29a96c5994a7d98108cec38ab0547bd45690b2.tar.gz bsdgames-darwin-ae29a96c5994a7d98108cec38ab0547bd45690b2.tar.zst bsdgames-darwin-ae29a96c5994a7d98108cec38ab0547bd45690b2.zip |
Paranoia about lengths of login names. From pjanzen of OpenBSD.
-rw-r--r-- | phantasia/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phantasia/main.c b/phantasia/main.c index 3a0f919c..57fe7557 100644 --- a/phantasia/main.c +++ b/phantasia/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.20 2009/05/26 00:27:23 dholland Exp $ */ +/* $NetBSD: main.c,v 1.21 2009/05/26 00:30:16 dholland Exp $ */ /* * Phantasia 3.3.2 -- Interterminal fantasy game @@ -162,7 +162,7 @@ main(int argc, char **argv) Timeout = TRUE; /* update some important player statistics */ - strcpy(Player.p_login, Login); + strlcpy(Player.p_login, Login, sizeof(Player.p_login)); time(&seconds); Player.p_lastused = localtime(&seconds)->tm_yday; Player.p_status = S_PLAYING; |