Core/WorldSocket: Handle unhandled exceptions

Properly handle unhandled exceptions happening with malformed packets.
Fix #19128
This commit is contained in:
jackpoz
2017-02-18 11:35:12 +01:00
parent 577324cc1c
commit 76f3e0edea

View File

@@ -324,7 +324,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
{
return HandlePing(packet) ? ReadDataHandlerResult::Ok : ReadDataHandlerResult::Error;
}
catch (ByteBufferPositionException const&)
catch (ByteBufferException const&)
{
}
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_PING", GetRemoteIpAddress().to_string().c_str());
@@ -346,7 +346,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
HandleAuthSession(packet);
return ReadDataHandlerResult::WaitingForQuery;
}
catch (ByteBufferPositionException const&)
catch (ByteBufferException const&)
{
}
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_AUTH_SESSION", GetRemoteIpAddress().to_string().c_str());