mirror of
https://github.com/ValveSoftware/GameNetworkingSockets.git
synced 2026-05-29 16:20:34 +00:00
Fix bug not properly detecting an invalid stop_waiting value.
P4:9130151
This commit is contained in:
@@ -989,12 +989,18 @@ bool CSteamNetworkConnectionBase::ProcessPlainTextDataChunk( int usecTimeSinceLa
|
||||
case 2: READ_24BITU( nOffset, szStopWaitingOffset ); break;
|
||||
case 3: READ_64BITU( nOffset, szStopWaitingOffset ); break;
|
||||
}
|
||||
if ( nOffset >= nPktNum )
|
||||
++nOffset;
|
||||
int64 nMinPktNumToSendAcks = nPktNum-nOffset;
|
||||
|
||||
// Make sure the resulting stop value makes sense.
|
||||
// Force the use of an unsigned comparison, since a negative stop value
|
||||
// is also illegal. That would be rejected below, but rejecting it here
|
||||
// is clearer.
|
||||
if ( (uint64)nMinPktNumToSendAcks >= (uint64)nPktNum )
|
||||
{
|
||||
DECODE_ERROR( "stop_waiting pktNum %llu offset %llu", nPktNum, nOffset );
|
||||
}
|
||||
++nOffset;
|
||||
int64 nMinPktNumToSendAcks = nPktNum-nOffset;
|
||||
|
||||
if ( nMinPktNumToSendAcks == m_receiverState.m_nMinPktNumToSendAcks )
|
||||
continue;
|
||||
if ( nMinPktNumToSendAcks < m_receiverState.m_nMinPktNumToSendAcks )
|
||||
|
||||
Reference in New Issue
Block a user