Fixed OOB access in audio_convertAccuracy test

main
Brick 2023-09-03 20:46:26 +01:00 committed by Sam Lantinga
parent 8387fae698
commit 2833f2e7b5
1 changed files with 2 additions and 2 deletions

View File

@ -994,9 +994,9 @@ static int audio_convertAccuracy(void *arg)
}
/* Shuffle the data for good measure */
for (i = src_num - 1; i >= 0; --i) {
for (i = src_num - 1; i > 0; --i) {
float f = src_data[i];
j = SDLTest_RandomIntegerInRange(0, src_num);
j = SDLTest_RandomIntegerInRange(0, i);
src_data[i] = src_data[j];
src_data[j] = f;
}