Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc

Issue 1220863002: Fail RTP parsing on excessive padding length. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: move paddingLength to + side Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698