Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
index df3067ac6f3f83d367a6bcc43e64d9facbd20deb..8e2ff1742ef941ac975c07602bb95d9180f11f93 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
@@ -237,7 +237,8 @@ bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t** restored_packet, |
size_t* packet_length, |
uint32_t original_ssrc, |
const RTPHeader& header) const { |
- if (kRtxHeaderSize + header.headerLength > *packet_length) { |
+ if (kRtxHeaderSize + header.headerLength + header.paddingLength > |
+ *packet_length) { |
return false; |
} |
const uint8_t* rtx_header = packet + header.headerLength; |