commit | 1f69c0373906e24b229dc2d0839a5d3c8b45250d | [log] [tgz] |
---|---|---|
author | mflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Tue Nov 15 06:12:39 2011 +0000 |
committer | mflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Tue Nov 15 06:12:39 2011 +0000 |
tree | 1baa3e57a7e644a682938c71dddcb47f8d96a406 | |
parent | 33df5335bffa5d2f250f8540a4fc981d8b156f1e [diff] |
Added size sanity check for copying app specific RTCP data. Similar check as done in RTCPUtility::RTCPParserV2::ParseAPPItem. Review URL: http://webrtc-codereview.appspot.com/277002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@942 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/modules/rtp_rtcp/source/rtcp_receiver_help.cc b/src/modules/rtp_rtcp/source/rtcp_receiver_help.cc index 359851e..0858d2b 100644 --- a/src/modules/rtp_rtcp/source/rtcp_receiver_help.cc +++ b/src/modules/rtp_rtcp/source/rtcp_receiver_help.cc
@@ -56,6 +56,11 @@ WebRtc_UWord8* oldData = applicationData; WebRtc_UWord16 oldLength = applicationLength; + // Don't copy more than kRtcpAppCode_DATA_SIZE bytes. + if (size > kRtcpAppCode_DATA_SIZE) { + size = kRtcpAppCode_DATA_SIZE; + } + applicationLength += size; applicationData = new WebRtc_UWord8[applicationLength];