From bd4a2feddb3002ecb9c9b67b812d2648fd02cfa7 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Fri, 3 May 2013 18:11:36 +0000 Subject: [PATCH] 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 --- webrtc/modules/audio_coding/neteq/packet_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/audio_coding/neteq/packet_buffer.c b/webrtc/modules/audio_coding/neteq/packet_buffer.c index 83079d7bf..a542333cf 100644 --- a/webrtc/modules/audio_coding/neteq/packet_buffer.c +++ b/webrtc/modules/audio_coding/neteq/packet_buffer.c @@ -324,8 +324,8 @@ int WebRtcNetEQ_PacketBufferInsert(PacketBuf_t *bufferInst, const RTPPacket_t *R { /* Payload is 16-bit aligned => just copy it */ - WEBRTC_SPL_MEMCPY_W16(bufferInst->currentMemoryPos, - RTPpacket->payload, (RTPpacket->payloadLen + 1) >> 1); + WEBRTC_SPL_MEMCPY_W8(bufferInst->currentMemoryPos, + RTPpacket->payload, RTPpacket->payloadLen); } else {