[FFmpeg-cvslog] r19984 - trunk/libavcodec/vorbis_dec.c

michael subversion
Wed Sep 23 12:45:14 CEST 2009


Author: michael
Date: Wed Sep 23 12:45:14 2009
New Revision: 19984

Log:
Fix book_idx check.
25_vorbis_floor0_index.patch by chrome.

Modified:
   trunk/libavcodec/vorbis_dec.c

Modified: trunk/libavcodec/vorbis_dec.c
==============================================================================
--- trunk/libavcodec/vorbis_dec.c	Wed Sep 23 12:40:33 2009	(r19983)
+++ trunk/libavcodec/vorbis_dec.c	Wed Sep 23 12:45:14 2009	(r19984)
@@ -553,12 +553,11 @@ static int vorbis_parse_setup_hdr_floors
                 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;
                 }
             }
 



More information about the ffmpeg-cvslog mailing list