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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_utility.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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/video/rampup_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
index 3fef05355c701d7235b546b520220cd99d0bddff..0d083bd92a5289f5c4e940c40a0eea096c01190e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -355,6 +355,8 @@ bool RtpHeaderParser::Parse(RTPHeader& header,
}
header.headerLength += XLen;
}
+ if (header.headerLength + header.paddingLength > static_cast<size_t>(length))
+ return false;
return true;
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/video/rampup_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698