Fix a bug in ACM test channel

The test code could read outside the allocated memory. The bug could up
until now not be triggered by the production code, but coming changes
would uncover it.

COAUTHOR=kwiberg@webrtc.org
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34929004

Cr-Commit-Position: refs/heads/master@{#8216}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8216 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2015-01-30 13:03:45 +00:00
parent 3154a1cf9d
commit 05db352f56

View File

@ -51,8 +51,8 @@ int32_t Channel::SendData(FrameType frameType,
// Treat fragmentation separately
if (fragmentation != NULL) {
// If silence for too long, send only new data.
if ((fragmentation->fragmentationTimeDiff[1] <= 0x3fff) &&
(fragmentation->fragmentationVectorSize == 2)) {
if ((fragmentation->fragmentationVectorSize == 2) &&
(fragmentation->fragmentationTimeDiff[1] <= 0x3fff)) {
// only 0x80 if we have multiple blocks
_payloadData[0] = 0x80 + fragmentation->fragmentationPlType[1];
size_t REDheader = (fragmentation->fragmentationTimeDiff[1] << 10) +