summaryrefslogtreecommitdiff
path: root/src/net_client.c
diff options
context:
space:
mode:
authorSimon Howard2010-05-01 21:47:26 +0000
committerSimon Howard2010-05-01 21:47:26 +0000
commit6787e90da50f6954d80512d172a985af4a6fc299 (patch)
treeb40fa2753430cb6465c2a4c8393cc0d7f6b62722 /src/net_client.c
parentda43e27597e40f5a298ed5c4ae785cc1b36510d4 (diff)
downloadchocolate-doom-6787e90da50f6954d80512d172a985af4a6fc299.tar.gz
chocolate-doom-6787e90da50f6954d80512d172a985af4a6fc299.tar.bz2
chocolate-doom-6787e90da50f6954d80512d172a985af4a6fc299.zip
Further sanity checking on use of strcpy() with dehacked string
replacements. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1928
Diffstat (limited to 'src/net_client.c')
-rw-r--r--src/net_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net_client.c b/src/net_client.c
index 0d6dd2fc..322869d7 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -193,7 +193,8 @@ static void NET_CL_PlayerQuitGame(player_t *player)
// Do this the same way as Vanilla Doom does, to allow dehacked
// replacements of this message
- strcpy(exitmsg, DEH_String("Player 1 left the game"));
+ strncpy(exitmsg, DEH_String("Player 1 left the game"), sizeof(exitmsg));
+ exitmsg[sizeof(exitmsg) - 1] = '\0';
exitmsg[7] += player - players;