~ubuntu-branches/ubuntu/lucid/ffmpeg-extra/lucid

« back to all changes in this revision

Viewing changes to debian/patches/security/libavcodec/vorbis_dec/0005-Check-classbook-value.patch

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-11-10 13:18:24 UTC
  • Revision ID: james.westby@ubuntu.com-20091110131824-ddrnmcvt76dcb8gk
Tags: 4:0.5+svn20090706-2ubuntu4
merge from 'ffmpeg' package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 093a791b172df483199fe81ac59ffcdbb63bf6c7 Mon Sep 17 00:00:00 2001
 
2
From: michael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
 
3
Date: Wed, 23 Sep 2009 12:02:31 +0000
 
4
Subject: [PATCH 05/12] Check classbook value.
 
5
 11_vorbis_residue_book_index.patch by chrome.
 
6
 
 
7
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19989 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
 
8
---
 
9
 libavcodec/vorbis_dec.c |    4 ++++
 
10
 1 files changed, 4 insertions(+), 0 deletions(-)
 
11
 
 
12
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
 
13
index ce5a139..2d5e610 100644
 
14
--- a/libavcodec/vorbis_dec.c
 
15
+++ b/libavcodec/vorbis_dec.c
 
16
@@ -630,6 +630,10 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context *vc){
 
17
         res_setup->partition_size=get_bits(gb, 24)+1;
 
18
         res_setup->classifications=get_bits(gb, 6)+1;
 
19
         res_setup->classbook=get_bits(gb, 8);
 
20
+        if (res_setup->classbook>=vc->codebook_count) {
 
21
+            av_log(vc->avccontext, AV_LOG_ERROR, "classbook value %d out of range. \n", res_setup->classbook);
 
22
+            return 1;
 
23
+        }
 
24
 
 
25
         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,
 
26
           res_setup->classifications, res_setup->classbook);
 
27
-- 
 
28
1.6.3.3
 
29