In ulpfec receiver check for malformed packets to avoid DCHECKS tirggering
If the packet can't be parsed, the buffer isn't moved to the packet. Then, a new empty buffer is moved back from the packet. Thus, the consequtive DCHECK fails because the data isn't the same anymore. Bug: chromium:1009236 Change-Id: Ie27f438c40f38074d42d8491fe03df45d50eba50 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155162 Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29340}
This commit is contained in:

committed by
Commit Bot

parent
2449d7aa78
commit
e7314cd4a2
@ -172,7 +172,9 @@ int32_t UlpfecReceiverImpl::ProcessReceivedFec() {
|
||||
// Create a packet with the buffer to modify it.
|
||||
RtpPacketReceived rtp_packet;
|
||||
const uint8_t* const original_data = packet->data.cdata();
|
||||
rtp_packet.Parse(packet->data);
|
||||
if (!rtp_packet.Parse(packet->data)) {
|
||||
RTC_LOG(LS_WARNING) << "Corrupted media packet";
|
||||
} else {
|
||||
rtp_packet.IdentifyExtensions(extensions_);
|
||||
// Reset buffer reference, so zeroing would work on a buffer with a
|
||||
// single reference.
|
||||
@ -182,6 +184,7 @@ int32_t UlpfecReceiverImpl::ProcessReceivedFec() {
|
||||
// Ensure that zeroing of extensions was done in place.
|
||||
RTC_DCHECK_EQ(packet->data.cdata(), original_data);
|
||||
}
|
||||
}
|
||||
fec_->DecodeFec(*received_packet, &recovered_packets_);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user