~ubuntu-branches/ubuntu/maverick/ffmpeg/maverick

« back to all changes in this revision

Viewing changes to debian/patches/security/libavformat/mov/0002-add-one-missing-check-for-stream-existence-in-read_e.patch

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2010-03-04 10:34:37 UTC
  • mfrom: (1.1.11 upstream) (0.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100304103437-mj2hpq7a581pzrxv
Tags: 4:0.5.1-1ubuntu1
* merge from debian. remaining changes:
  - don't disable encoders
  - don't build against libfaad, libdirac and libopenjpeg (all in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From b601744633167a1b37bc171d298872d57522400e Mon Sep 17 00:00:00 2001
2
 
From: bcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
3
 
Date: Mon, 7 Sep 2009 22:36:33 +0000
4
 
Subject: [PATCH] add one missing check for stream existence in read_elst, fix #1364
5
 
 
6
 
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19792 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
7
 
---
8
 
 libavformat/mov.c |    6 +++++-
9
 
 1 files changed, 5 insertions(+), 1 deletions(-)
10
 
 
11
 
diff --git a/libavformat/mov.c b/libavformat/mov.c
12
 
index 74698e0..5f11ebe 100644
13
 
--- a/libavformat/mov.c
14
 
+++ b/libavformat/mov.c
15
 
@@ -1905,9 +1905,13 @@ free_and_return:
16
 
 /* edit list atom */
17
 
 static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
18
 
 {
19
 
-    MOVStreamContext *sc = c->fc->streams[c->fc->nb_streams-1]->priv_data;
20
 
+    MOVStreamContext *sc;
21
 
     int i, edit_count;
22
 
 
23
 
+    if (c->fc->nb_streams < 1)
24
 
+        return 0;
25
 
+    sc = c->fc->streams[c->fc->nb_streams-1]->priv_data;
26
 
+
27
 
     get_byte(pb); /* version */
28
 
     get_be24(pb); /* flags */
29
 
     edit_count = get_be32(pb); /* entries */
30
 
1.6.3.3
31