Mercurial > libavcodec.hg
diff vorbis_dec.c @ 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 | f39076e0d605 |
children | 38ab367d4231 |
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));