2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

sv_main.cpp: SV_New_f() uses Q_snprintf() unsafe format. (#807)

This commit is contained in:
Very Strange Karaulov 2021-06-19 22:39:40 +03:00 committed by GitHub
parent 527d0819b9
commit ad6f6ad396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.