1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

fix potential overflow

This commit is contained in:
zsilencer
2015-11-01 14:28:01 -07:00
committed by IntelOrca
parent c7a85c5114
commit d66eb70f56

View File

@@ -1182,7 +1182,7 @@ int Network::Client_Handle_PINGLIST(NetworkConnection& connection, NetworkPacket
int Network::Client_Handle_SETDISCONNECTMSG(NetworkConnection& connection, NetworkPacket& packet)
{
static char msg[256] = {0};
static char msg[100] = {0};
const char* disconnectmsg = packet.ReadString();
if (disconnectmsg) {
safe_strncpy(msg, disconnectmsg, sizeof(msg));