From 5174032953dabb3ab2eb3a5c1bf6934b5b79c3c9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 11 Oct 2011 13:45:49 +0200 Subject: [PATCH] g723.1: use memmove() where overlapping src and dst can happen. Signed-off-by: Michael Niedermayer --- libavcodec/g723_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 9970d907f7..e1dc431d0e 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -2179,7 +2179,7 @@ static int g723_1_encode_frame(AVCodecContext *avctx, unsigned char *buf, gen_acb_excitation(impulse_resp, p->prev_excitation, p->pitch_lag[i >> 1], p->subframe[i], Rate6k3); - memcpy(p->prev_excitation, p->prev_excitation + SUBFRAME_LEN, + memmove(p->prev_excitation, p->prev_excitation + SUBFRAME_LEN, sizeof(int16_t) * (PITCH_MAX - SUBFRAME_LEN)); for (j = 0; j < SUBFRAME_LEN; j++) in[j] = av_clip_int16((in[j] << 1) + impulse_resp[j]);