From ad6f6ad39610f453c0c4f9ace5275dc69c9ab782 Mon Sep 17 00:00:00 2001 From: Very Strange Karaulov <62130676+2020karaulov2020@users.noreply.github.com> Date: Sat, 19 Jun 2021 22:39:40 +0300 Subject: [PATCH] sv_main.cpp: `SV_New_f()` uses `Q_snprintf()` unsafe format. (#807) --- rehlds/engine/sv_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 4a2d54c09..7c2f6272a 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -1537,8 +1537,8 @@ void SV_New_f(void) gEntityInterface.pfnClientDisconnect(ent); } - Q_snprintf(szName, sizeof(szName), host_client->name); - Q_snprintf(szAddress, sizeof(szAddress), NET_AdrToString(host_client->netchan.remote_address)); + Q_snprintf(szName, sizeof(szName), "%s", host_client->name); + Q_snprintf(szAddress, sizeof(szAddress), "%s", NET_AdrToString(host_client->netchan.remote_address)); Q_snprintf(szRejectReason, sizeof(szRejectReason), "Connection rejected by game\n"); // Allow the game dll to reject this client.