fix: stabilize turtle world entry session handling

This commit is contained in:
Kelsi 2026-03-15 01:21:23 -07:00
parent 4dba20b757
commit b0fafe5efa
20 changed files with 2283 additions and 1380 deletions

View file

@ -1344,8 +1344,10 @@ bool UpdateObjectParser::parseUpdateBlock(network::Packet& packet, UpdateBlock&
}
bool UpdateObjectParser::parse(network::Packet& packet, UpdateObjectData& data) {
constexpr uint32_t kMaxReasonableUpdateBlocks = 4096;
constexpr uint32_t kMaxReasonableOutOfRangeGuids = 16384;
// Keep worst-case packet parsing bounded. Extremely large counts are typically
// malformed/desynced and can stall a frame long enough to trigger disconnects.
constexpr uint32_t kMaxReasonableUpdateBlocks = 1024;
constexpr uint32_t kMaxReasonableOutOfRangeGuids = 4096;
// Read block count
data.blockCount = packet.readUInt32();