[FFmpeg-cvslog] r14309 - trunk/libavcodec/qdm2.c
banan
subversion
Sat Jul 19 20:53:04 CEST 2008
Author: banan
Date: Sat Jul 19 20:53:04 2008
New Revision: 14309
Log:
Prevent the qdm2 code from overreading/overflowing. Fixes Coverity ID 112 run 2
Modified:
trunk/libavcodec/qdm2.c
Modified: trunk/libavcodec/qdm2.c
==============================================================================
--- trunk/libavcodec/qdm2.c (original)
+++ trunk/libavcodec/qdm2.c Sat Jul 19 20:53:04 2008
@@ -684,7 +684,7 @@ static void fill_coding_method_array (sb
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;
More information about the ffmpeg-cvslog
mailing list