(svn r2899) -Fix: Several format string vulnerabilities and buffer overflows in the network code

This commit is contained in:
tron
2005-08-28 12:24:57 +00:00
parent de4f69d42e
commit f02b1f2967
5 changed files with 13 additions and 13 deletions

View File

@@ -1132,7 +1132,7 @@ DEF_CONSOLE_HOOK(ConProcPlayerName)
SEND_COMMAND(PACKET_CLIENT_SET_NAME)(_network_player_name);
} else {
if (NetworkFindName(_network_player_name)) {
NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, _network_player_name);
NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, "%s", _network_player_name);
ttd_strlcpy(ci->client_name, _network_player_name, sizeof(ci->client_name));
NetworkUpdateClientInfo(NETWORK_SERVER_INDEX);
}