Fix off-by-one buffer overflow in WebRtcNetEQ_PacketBufferInsert().

BUG=1725
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3953 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
sergeyu@chromium.org 2013-05-03 18:11:36 +00:00
parent d3cd565ecf
commit bd4a2feddb

View File

@ -324,8 +324,8 @@ int WebRtcNetEQ_PacketBufferInsert(PacketBuf_t *bufferInst, const RTPPacket_t *R
{ {
/* Payload is 16-bit aligned => just copy it */ /* Payload is 16-bit aligned => just copy it */
WEBRTC_SPL_MEMCPY_W16(bufferInst->currentMemoryPos, WEBRTC_SPL_MEMCPY_W8(bufferInst->currentMemoryPos,
RTPpacket->payload, (RTPpacket->payloadLen + 1) >> 1); RTPpacket->payload, RTPpacket->payloadLen);
} }
else else
{ {