require a full range pair in SSU2 ack block

This commit is contained in:
acetone
2026-09-14 14:45:39 -04:00
parent a5d4896a5c
commit e86eac8ee7
+1 -1
View File
@@ -2047,7 +2047,7 @@ namespace transport
len -= 5;
if (!len || m_SentPackets.empty ()) return; // don't handle ranges if nothing to acknowledge
const uint8_t * ranges = buf + 5;
while (len > 0 && firstPacketNum && ackThrough - firstPacketNum < SSU2_MAX_NUM_ACK_PACKETS)
while (len >= 2 && firstPacketNum && ackThrough - firstPacketNum < SSU2_MAX_NUM_ACK_PACKETS)
{
uint32_t lastPacketNum = firstPacketNum - 1;
if (*ranges > lastPacketNum) break;