Original Commit: r69 | ods15 | 2006-09-27 20:27:50 +0300 (Wed, 27 Sep 2006) | 2 lines

prevent buffer overflow

Originally committed as revision 6474 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Oded Shimon 19 years ago
parent 65c7236929
commit 90a09b69d7
  1. 2
      libavcodec/vorbis_enc.c

@ -661,7 +661,7 @@ static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int *
for (j = begin; j < end; j++) average += fabs(coeffs[j]);
average /= end - begin;
average /= 32; // MAGIC!
for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
for (j = 0; j < range - 1; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
posts[fc->list[i].sort] = j;
}
}

Loading…
Cancel
Save