From d9a3f81b3e40661b6aae425d8256d9e01b63a54b Mon Sep 17 00:00:00 2001 From: gpoirier Date: Fri, 15 Jul 2005 22:09:30 +0000 Subject: [PATCH] memcpy and memmove both copy memory, but when using memcpy the source and destination must not overlap, but here, they did overlap. Committed with the kind blessing of Richard, patch by uau git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15979 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_faad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpcodecs/ad_faad.c b/libmpcodecs/ad_faad.c index d9a60ba8cf..7b8ded0018 100644 --- a/libmpcodecs/ad_faad.c +++ b/libmpcodecs/ad_faad.c @@ -238,7 +238,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) sh->a_in_buffer_len=0; } else { sh->a_in_buffer_len-=faac_finfo.bytesconsumed; - memcpy(sh->a_in_buffer,&sh->a_in_buffer[faac_finfo.bytesconsumed],sh->a_in_buffer_len); + memmove(sh->a_in_buffer,&sh->a_in_buffer[faac_finfo.bytesconsumed],sh->a_in_buffer_len); } if(faac_finfo.error > 0) {