mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Fix bounds check (#1071)
Fix Chat Crash Update CMakeVariables.txt Add checks for all servers
This commit is contained in:
@@ -728,7 +728,7 @@ void HandlePacket(Packet* packet) {
|
||||
Game::server->SendToMaster(&bitStream);
|
||||
}
|
||||
|
||||
if (packet->data[0] != ID_USER_PACKET_ENUM) return;
|
||||
if (packet->data[0] != ID_USER_PACKET_ENUM || packet->length < 4) return;
|
||||
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::SERVER) {
|
||||
if (static_cast<eServerMessageType>(packet->data[3]) == eServerMessageType::VERSION_CONFIRM) {
|
||||
AuthPackets::HandleHandshake(Game::server, packet);
|
||||
|
Reference in New Issue
Block a user