From f6822e30ea3230888716439863b2503e836523a9 Mon Sep 17 00:00:00 2001 From: namazso Date: Fri, 29 Mar 2019 18:21:09 +0000 Subject: [PATCH] fix buffer overflow (#687) --- rehlds/engine/sv_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 1116349..f9e54a8 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -5833,7 +5833,7 @@ void EXT_FUNC SV_ActivateServer_internal(int runPhysics) if (mapchangecfgfile.string && *mapchangecfgfile.string) { AlertMessage(at_console, "Executing map change config file\n"); - Q_sprintf(szCommand, "exec %s\n", mapchangecfgfile.string); + Q_snprintf(szCommand, sizeof(szCommand), "exec %s\n", mapchangecfgfile.string); Cbuf_AddText(szCommand); }