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
This commit is contained in:
@ -56,6 +56,11 @@ RTCPPacketInformation::AddApplicationData(const WebRtc_UWord8* data, const WebRt
|
||||
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];
|
||||
|
||||
|
Reference in New Issue
Block a user