# HG changeset patch # User gpoirier # Date 1121465370 0 # Node ID c8dc500e078e3f34725e06dc06e6e47cfdb6e2e6 # Parent 54f2deef4b68b5b3c3db6d2fd88d3d3c281d967e 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 diff -r 54f2deef4b68 -r c8dc500e078e libmpcodecs/ad_faad.c --- a/libmpcodecs/ad_faad.c Fri Jul 15 17:55:42 2005 +0000 +++ b/libmpcodecs/ad_faad.c Fri Jul 15 22:09:30 2005 +0000 @@ -238,7 +238,7 @@ 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) {