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

« back to all changes in this revision

Viewing changes to debian/patches/security/libavformat/oggdec/0001-Disable-parsing-for-ogg-streams-where-no-ogg-header-.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 7fb2fe280374bcb1c41c2a8e7aa5632d18dc4279 Mon Sep 17 00:00:00 2001
 
2
From: reimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
 
3
Date: Wed, 30 Sep 2009 09:46:48 +0000
 
4
Subject: [PATCH] Disable parsing for ogg streams where no ogg header was found,
 
5
 if no header was found the parser was not initialized and thus will
 
6
 crash when trying to use it.
 
7
 
 
8
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20093 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
 
9
---
 
10
 libavformat/oggdec.c |    5 +++++
 
11
 1 files changed, 5 insertions(+), 0 deletions(-)
 
12
 
 
13
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
 
14
index 5d42db7..adf0ad0 100644
 
15
--- a/libavformat/oggdec.c
 
16
+++ b/libavformat/oggdec.c
 
17
@@ -477,12 +477,17 @@ static int
 
18
 ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
 
19
 {
 
20
     struct ogg *ogg = s->priv_data;
 
21
+    int i;
 
22
     ogg->curidx = -1;
 
23
     //linear headers seek from start
 
24
     if (ogg_get_headers (s) < 0){
 
25
         return -1;
 
26
     }
 
27
 
 
28
+    for (i = 0; i < ogg->nstreams; i++)
 
29
+        if (ogg->streams[i].header < 0)
 
30
+            ogg->streams[i].codec = NULL;
 
31
+
 
32
     //linear granulepos seek from end
 
33
     ogg_get_length (s);
 
34
 
 
35
-- 
 
36
1.6.3.3
 
37