SDL/src
Sam Lantinga 553b328664 Fixed bug 3668 - Overflow of SDL_AudioCVT.filters with some downmixes
Simon Hug

There's a chance that an audio conversion from many channels to a few can use more than 9 audio filters. SDL_AudioCVT has 10 SDL_AudioFilter pointers of which one has to be the terminating NULL pointer. The SDL code has no checks for this limit. If it overflows there can be stack or heap corruption or a call to 0xa.

Attached patch adds a function that checks for this limit and throws an error if it is reached. Also adds some documentation.

Test parameters that trigger this issue:
AUDIO_U16MSB with 224 channels at 46359 Hz
                 V
AUDIO_S16MSB with 6 channels at 27463 Hz

The fuzzer program I uploaded in bug 3667 has more of them.
2017-06-12 16:39:15 -07:00
..
atomic atomic: Patched to compile on Android. 2017-04-13 15:28:56 -04:00
audio Fixed bug 3668 - Overflow of SDL_AudioCVT.filters with some downmixes 2017-06-12 16:39:15 -07:00
core linux: Changed internal functions to be static. 2017-06-11 22:30:58 +02:00
cpuinfo Fixed compile error with gcc -std=c99 2017-03-06 21:25:06 -08:00
dynapi stdlib: added SDL_utf8strlen(). 2017-05-29 03:01:05 -04:00
events Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
file Updated copyright for 2017 2017-01-01 18:33:28 -08:00
filesystem android: Fixed missing error message for SDL_GetBasePath(). 2017-06-04 23:15:27 +02:00
haptic linux: Changed internal functions to be static. 2017-06-11 22:30:58 +02:00
joystick linux: Changed internal functions to be static. 2017-06-11 22:30:58 +02:00
libm Updated copyright for 2017 2017-01-01 18:33:28 -08:00
loadso Updated copyright for 2017 2017-01-01 18:33:28 -08:00
main Removed duplicate includes. 2017-06-04 23:15:47 +02:00
power power: Add Linux org.freedesktop.UPower D-Bus implementation. 2017-05-28 07:14:11 -04:00
render Merged Eric Wing's overscan patch. 2017-06-06 14:06:40 -04:00
stdlib Fixed whitespace code style. 2017-05-29 00:51:38 -04:00
test test: info now reports usable display bounds and DPI (thanks, Eric!). 2017-05-18 16:29:10 -04:00
thread windows: Change the default on SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING. 2017-06-06 13:12:43 -04:00
timer Updated copyright for 2017 2017-01-01 18:33:28 -08:00
video directfb: Fixed comment. 2017-06-11 22:30:49 +02:00
SDL_assert_c.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_assert.c assert: Better Emscripten support. 2017-05-19 14:51:03 -04:00
SDL_dataqueue.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_dataqueue.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_error_c.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_error.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_hints.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_internal.h Some patches to make SDL compile with armcc (ARM's C compiler). 2017-03-02 13:33:04 -05:00
SDL_log.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL.c Backing out broken change from previous commit. 2017-04-01 00:46:42 -04:00