changeset 9933:6fd0b776f838 libavcodec

Make sure that values generated for ff_vorbis_len2vlc in vorbis_parse_setup_hdr_codebooks are in the valid range (<=32).
author reimar
date Wed, 08 Jul 2009 19:31:04 +0000
parents 89f0fd3f1908
children ff96ee73b08b
files vorbis_dec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_dec.c	Wed Jul 08 14:58:16 2009 +0000
+++ b/vorbis_dec.c	Wed Jul 08 19:31:04 2009 +0000
@@ -292,7 +292,7 @@
             AV_DEBUG(" ordered, current length: %d \n", current_length);  //FIXME
 
             used_entries=entries;
-            for(;current_entry<used_entries;++current_length) {
+            for(;current_entry<used_entries && current_length <= 32;++current_length) {
                 uint_fast16_t i, number;
 
                 AV_DEBUG(" number bits: %d ", ilog(entries - current_entry));