Skip to content

Commit

Permalink
audio: SDL_ResampleCVT() should use memmove instead of memcpy.
Browse files Browse the repository at this point in the history
This copy can overlap.

Fixes Bugzilla #3849.
  • Loading branch information
icculus committed Oct 11, 2017
1 parent 42fff7c commit 903ff64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audiocvt.c
Expand Up @@ -732,7 +732,7 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format

SDL_free(padding);

SDL_memcpy(cvt->buf, dst, cvt->len_cvt); /* !!! FIXME: remove this if we can get the resampler to work in-place again. */
SDL_memmove(cvt->buf, dst, cvt->len_cvt); /* !!! FIXME: remove this if we can get the resampler to work in-place again. */

if (cvt->filters[++cvt->filter_index]) {
cvt->filters[cvt->filter_index](cvt, format);
Expand Down

0 comments on commit 903ff64

Please sign in to comment.