From ae29a96c5994a7d98108cec38ab0547bd45690b2 Mon Sep 17 00:00:00 2001 From: dholland Date: Tue, 26 May 2009 00:30:16 +0000 Subject: Paranoia about lengths of login names. From pjanzen of OpenBSD. --- phantasia/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phantasia') 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; -- cgit v1.2.3-56-ge451