Mercurial > libavcodec.hg
changeset 7326:fe8a7f5905e4 libavcodec
Prevent the qdm2 code from overreading/overflowing. Fixes Coverity ID 112 run 2
author | banan |
---|---|
date | Sat, 19 Jul 2008 18:53:04 +0000 |
parents | af725308adf4 |
children | 483421b11d98 |
files | qdm2.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;