diff options
author | Google Chrome <> | 2010-02-09 19:47:42 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2010-02-09 19:47:42 +0000 |
commit | b8ec4c49bd751f23aa175dbb64ff8d75edb7b917 (patch) | |
tree | 82150348c55b8d1a0ad6a4b5712f95d1242f9bfa | |
parent | 49487dfd780bf0e33ca9aec4210f6f1eef8d8ba7 (diff) |
Check classbook value.
11_vorbis_residue_book_index.patch by chrome.
r19989 by michael
Originally committed as revision 21725 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
-rw-r--r-- | libavcodec/vorbis_dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c index 29e7bdbf41..4410fc04c3 100644 --- a/libavcodec/vorbis_dec.c +++ b/libavcodec/vorbis_dec.c @@ -635,6 +635,10 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context *vc){ res_setup->partition_size=get_bits(gb, 24)+1; res_setup->classifications=get_bits(gb, 6)+1; res_setup->classbook=get_bits(gb, 8); + if (res_setup->classbook>=vc->codebook_count) { + av_log(vc->avccontext, AV_LOG_ERROR, "classbook value %d out of range. \n", res_setup->classbook); + return 1; + } AV_DEBUG(" begin %d end %d part.size %d classif.s %d classbook %d \n", res_setup->begin, res_setup->end, res_setup->partition_size, res_setup->classifications, res_setup->classbook); |