summaryrefslogtreecommitdiff
path: root/src/wi_stuff.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/wi_stuff.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/wi_stuff.c')
-rw-r--r--src/wi_stuff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wi_stuff.c b/src/wi_stuff.c
index e7eece07..e8fcab42 100644
--- a/src/wi_stuff.c
+++ b/src/wi_stuff.c
@@ -1749,11 +1749,13 @@ void WI_loadData(void)
if (gamemode == commercial)
{
- strcpy(bg_lumpname, DEH_String("INTERPIC"));
+ strncpy(bg_lumpname, 9, DEH_String("INTERPIC"));
+ bg_lumpname[8] = '\0';
}
else if (gamemode == retail && wbs->epsd == 3)
{
- strcpy(bg_lumpname, DEH_String("INTERPIC"));
+ strncpy(bg_lumpname, 9, DEH_String("INTERPIC"));
+ bg_lumpname[8] = '\0';
}
else
{