changeset 3869:9b1217a7e09f libavcodec

Original Commit: r69 | ods15 | 2006-09-27 20:27:50 +0300 (Wed, 27 Sep 2006) | 2 lines prevent buffer overflow
author ods15
date Mon, 02 Oct 2006 06:08:07 +0000
parents 46441c25abdc
children 986fb3b8fe60
files vorbis_enc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 06:08:03 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 06:08:07 2006 +0000
@@ -661,7 +661,7 @@
         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;
     }
 }