Fix book_idx check.

25_vorbis_floor0_index.patch by chrome.

Originally committed as revision 19984 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Google Chrome 16 years ago committed by Michael Niedermayer
parent d70fa8f131
commit 96651e790c
  1. 5
      libavcodec/vorbis_dec.c

@ -553,12 +553,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) {
uint_fast8_t book_idx;
for (idx=0;idx<floor_setup->data.t0.num_books;++idx) {
book_idx=get_bits(gb, 8);
if (book_idx>=vc->codebook_count)
return 1;
floor_setup->data.t0.book_list[idx]=book_idx;
if (vc->codebooks[book_idx].dimensions > max_codebook_dim)
max_codebook_dim=vc->codebooks[book_idx].dimensions;
if (floor_setup->data.t0.book_list[idx]>vc->codebook_count)
return 1;
}
}

Loading…
Cancel
Save