RTC: 修复TWCC feedback rtcp解析status chunk错误的问题 (#3059)

在解析packet status chunk的时候使用了uint8_t类型的循环变量,如果反馈的包数量超过255,那么解析会陷入循环,出现异常
This commit is contained in:
yujitai 2023-12-01 10:45:24 +08:00 committed by GitHub
parent 586bb73912
commit a8e2d602cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -432,7 +432,7 @@ FCI_TWCC::TwccPacketStatus FCI_TWCC::getPacketChunkList(size_t total_size) const
CHECK(ptr < end); CHECK(ptr < end);
auto seq = getBaseSeq(); auto seq = getBaseSeq();
auto rtp_count = getPacketCount(); auto rtp_count = getPacketCount();
for (uint8_t i = 0; i < rtp_count;) { for (uint16_t i = 0; i < rtp_count;) {
CHECK(ptr + RunLengthChunk::kSize <= end); CHECK(ptr + RunLengthChunk::kSize <= end);
RunLengthChunk *chunk = (RunLengthChunk *)ptr; RunLengthChunk *chunk = (RunLengthChunk *)ptr;
if (!chunk->type) { if (!chunk->type) {