summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_dec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-07-08 19:31:04 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-07-08 19:31:04 +0000
commit1de4ba71555fcd2cc3d9bcef004c2c70b475a465 (patch)
tree2eb39a50caec5c082d1b8438cf679add505849ff /libavcodec/vorbis_dec.c
parent287fff266f1512dde69c84621d042d9bbdaa3496 (diff)
Make sure that values generated for ff_vorbis_len2vlc in
vorbis_parse_setup_hdr_codebooks are in the valid range (<=32). Originally committed as revision 19373 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_dec.c')
-rw-r--r--libavcodec/vorbis_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
index d5d2972e8a..bb582c2bf0 100644
--- a/libavcodec/vorbis_dec.c
+++ b/libavcodec/vorbis_dec.c
@@ -292,7 +292,7 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) {
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));