diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-02-11 21:49:26 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-02-11 21:49:26 +0000 |
| commit | 79dfdb3cd71a44ec3cd8e1dab15263837381cbbf (patch) | |
| tree | fe7ce8c125d74f74ecaea895f679cfe251fac784 /src/game/server/gs_game.cpp | |
| parent | 57b2da779f242da46ec2ac3f994cf536af7a03e4 (diff) | |
| download | zcatch-79dfdb3cd71a44ec3cd8e1dab15263837381cbbf.tar.gz zcatch-79dfdb3cd71a44ec3cd8e1dab15263837381cbbf.zip | |
security audit: first batch of fixes. replaced sprintf, strcpy with more secure versions
Diffstat (limited to 'src/game/server/gs_game.cpp')
| -rw-r--r-- | src/game/server/gs_game.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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() |