From 60d22a4d20e3b500c2db97b4ab950e7776fd1a9f Mon Sep 17 00:00:00 2001 From: TimeServ Date: Thu, 18 May 2006 01:43:22 +0000 Subject: [PATCH] prevent buffer overrun with map name git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2284 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index cc3351c7f..cd0a4c447 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -1165,9 +1165,9 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us if (val) { if (progstype == PROG_H2) - sprintf(sv.mapname, "%s", T_GetString(val->_float-1)); + Q_snprintfz(sv.mapname, sizeof(sv.mapname), "%s", T_GetString(val->_float-1)); else - sprintf(sv.mapname, "%s", PR_GetString(svprogfuncs, val->string)); + Q_snprintfz(sv.mapname, sizeof(sv.mapname), "%s", PR_GetString(svprogfuncs, val->string)); } if (Cvar_Get("sv_readonlyworld", "1", 0, "DP compatability")->value) ent->readonly = true; //lock it down!