Fixed busy loop in case of partially malformed rtcp packet
BUG=webrtc:5574 Review URL: https://codereview.webrtc.org/1726573003 Cr-Commit-Position: refs/heads/master@{#11946}
This commit is contained in:
@ -157,6 +157,13 @@ TEST_F(RtcpReceiverTest, BrokenPacketIsIgnored) {
|
||||
EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
|
||||
}
|
||||
|
||||
TEST_F(RtcpReceiverTest, InvalidFeedbackPacketIsIgnored) {
|
||||
// Too short feedback packet.
|
||||
const uint8_t bad_packet[] = {0x80, RTCPUtility::PT_RTPFB, 0, 0};
|
||||
EXPECT_EQ(0, InjectRtcpPacket(bad_packet, sizeof(bad_packet)));
|
||||
EXPECT_EQ(0U, rtcp_packet_info_.rtcpPacketTypeFlags);
|
||||
}
|
||||
|
||||
TEST_F(RtcpReceiverTest, InjectSrPacket) {
|
||||
const uint32_t kSenderSsrc = 0x10203;
|
||||
rtcp::SenderReport sr;
|
||||
|
||||
@ -230,6 +230,7 @@ RTCPUtility::RTCPParserV2::IterateTopLevel()
|
||||
{
|
||||
if (!ParseFBCommon(header)) {
|
||||
// Nothing supported found, continue to next block!
|
||||
EndCurrentBlock();
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user