# HG changeset patch # User banan # Date 1216493584 0 # Node ID fe8a7f5905e47b9b5458269f17756af0517db8a6 # Parent af725308adf43605df9f045d196909d95c8dbbbf Prevent the qdm2 code from overreading/overflowing. Fixes Coverity ID 112 run 2 diff -r af725308adf4 -r fe8a7f5905e4 qdm2.c --- a/qdm2.c Sat Jul 19 16:16:00 2008 +0000 +++ b/qdm2.c Sat Jul 19 18:53:04 2008 +0000 @@ -684,7 +684,7 @@ SAMPLES_NEEDED for (ch = 0; ch < nb_channels; ch++) for (sb = 0; sb < 30; sb++) { - for (j = 1; j < 64; j++) { + for (j = 1; j < 63; j++) { // The loop only iterates to 63 so the code doesn't overflow the buffer add1 = tone_level_idx[ch][sb][j] - 10; if (add1 < 0) add1 = 0;