From c50e06f564509cf5402212a6edbe38c1240938fb Mon Sep 17 00:00:00 2001 From: JuelzIrons Date: Tue, 10 Mar 2026 00:37:28 -0400 Subject: [PATCH] info about size limits not sure if this is what you meant by 'could you document where this maximum comes from in the code' but i assume you meant this --- .../Durango/Network/DQRNetworkManager_SendReceive.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp b/Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp index d3b070536..b02ec449f 100644 --- a/Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp +++ b/Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp @@ -217,7 +217,8 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo, memcpy( &receivedSize, connectionInfo->m_pucRoomSyncData, 4); delete [] connectionInfo->m_pucRoomSyncData; - if( receivedSize < 0 || receivedSize > 1048576 ) + // a 512KB limit gives enough headroom for legitimate XUID data, but prevents a overflow. With 2 players the size is about 100kb so 512kb gives good headroom + if( receivedSize < 0 || receivedSize > 524288 ) { DQRNetworkManager::LogCommentFormat(L"RoomSyncData rejected: size=%d", receivedSize); connectionInfo->m_internalDataState = DQRConnectionInfo::ConnectionState_InternalHeaderByte; @@ -321,7 +322,8 @@ void DQRNetworkManager::BytesReceivedInternal(DQRConnectionInfo *connectionInfo, memcpy( &receivedSize, connectionInfo->m_pucAddFailedPlayerData, 4); delete [] connectionInfo->m_pucAddFailedPlayerData; - if( receivedSize < 0 || receivedSize > 1048576 ) + // a 512KB limit gives enough headroom for legitimate XUID strings, but prevents a overflow. + if( receivedSize < 0 || receivedSize > 524288 ) { DQRNetworkManager::LogCommentFormat(L"AddFailedPlayerData rejected: size=%d", receivedSize); connectionInfo->m_internalDataState = DQRConnectionInfo::ConnectionState_InternalHeaderByte;