1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

handle bad map data and close connection

This commit is contained in:
Ted John
2016-06-09 18:37:12 +01:00
parent 27b3c71588
commit 1761907f57
2 changed files with 8 additions and 0 deletions

View File

@@ -1202,6 +1202,9 @@ bool Network::ProcessConnection(NetworkConnection& connection)
case NETWORK_READPACKET_SUCCESS:
// done reading in packet
ProcessPacket(connection, connection.InboundPacket);
if (connection.Socket == nullptr) {
return false;
}
break;
case NETWORK_READPACKET_MORE_DATA:
// more data required to be read
@@ -1600,6 +1603,7 @@ void Network::Client_Handle_MAP(NetworkConnection& connection, NetworkPacket& pa
if (data == NULL)
{
log_warning("Failed to decompress data sent from server.");
Close();
return;
}
} else {