From 79dfdb3cd71a44ec3cd8e1dab15263837381cbbf Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 11 Feb 2008 21:49:26 +0000 Subject: security audit: first batch of fixes. replaced sprintf, strcpy with more secure versions --- src/game/server/gs_game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/server/gs_game.cpp') diff --git a/src/game/server/gs_game.cpp b/src/game/server/gs_game.cpp index 9a9c233e..a1b5fd7b 100644 --- a/src/game/server/gs_game.cpp +++ b/src/game/server/gs_game.cpp @@ -115,6 +115,7 @@ void gameobject::cyclemap() { if(!strlen(config.sv_maprotation)) return; + // handle maprotation char buf[512]; const char *s = strstr(config.sv_maprotation, config.sv_map); @@ -145,7 +146,7 @@ void gameobject::cyclemap() i++; dbg_msg("game", "rotating map to %s", &buf[i]); - strcpy(config.sv_map, &buf[i]); + str_copy(config.sv_map, &buf[i], sizeof(config.sv_map)); } void gameobject::post_reset() -- cgit 1.4.1