Module Name:    src
Committed By:   dholland
Date:           Tue May 26 00:30:16 UTC 2009

Modified Files:
        src/games/phantasia: main.c

Log Message:
Paranoia about lengths of login names. From pjanzen of OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/games/phantasia/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/phantasia/main.c
diff -u src/games/phantasia/main.c:1.20 src/games/phantasia/main.c:1.21
--- src/games/phantasia/main.c:1.20	Tue May 26 00:27:23 2009
+++ src/games/phantasia/main.c	Tue May 26 00:30:16 2009
@@ -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 @@
 		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;

Reply via email to