audio: SDL_ResampleCVT() should use memmove instead of memcpy.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 10 Oct 2017 22:31:02 -0400
changeset 11586f882930f174f
parent 11585 9b646e8f4622
child 11587 81bb943fae58
audio: SDL_ResampleCVT() should use memmove instead of memcpy.

This copy can overlap.

Fixes Bugzilla #3849.
src/audio/SDL_audiocvt.c
     1.1 --- a/src/audio/SDL_audiocvt.c	Tue Oct 10 22:18:46 2017 -0400
     1.2 +++ b/src/audio/SDL_audiocvt.c	Tue Oct 10 22:31:02 2017 -0400
     1.3 @@ -732,7 +732,7 @@
     1.4  
     1.5      SDL_free(padding);
     1.6  
     1.7 -    SDL_memcpy(cvt->buf, dst, cvt->len_cvt);  /* !!! FIXME: remove this if we can get the resampler to work in-place again. */
     1.8 +    SDL_memmove(cvt->buf, dst, cvt->len_cvt);  /* !!! FIXME: remove this if we can get the resampler to work in-place again. */
     1.9  
    1.10      if (cvt->filters[++cvt->filter_index]) {
    1.11          cvt->filters[cvt->filter_index](cvt, format);