~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0019-lavf-fix-segfault-in-av_open_input_stream.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 9c2a02466053dd4762d474d89d9be9a957eaaefe Mon Sep 17 00:00:00 2001
 
2
From: Anton Khirnov <anton@khirnov.net>
 
3
Date: Tue, 12 Jul 2011 22:42:18 +0200
 
4
Subject: [PATCH 19/70] lavf: fix segfault in av_open_input_stream()
 
5
 
 
6
ic is NULL in case of error.
 
7
(cherry picked from commit 13551ad1e336573e3732fdeaf25607c47244bb80)
 
8
 
 
9
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
10
---
 
11
 libavformat/utils.c |    3 ++-
 
12
 1 files changed, 2 insertions(+), 1 deletions(-)
 
13
 
 
14
diff --git a/libavformat/utils.c b/libavformat/utils.c
 
15
index 0e6b001..2cb096e 100644
 
16
--- a/libavformat/utils.c
 
17
+++ b/libavformat/utils.c
 
18
@@ -465,7 +465,8 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
 
19
     else
 
20
         ic->pb = pb;
 
21
 
 
22
-    err = avformat_open_input(&ic, filename, fmt, &opts);
 
23
+    if ((err = avformat_open_input(&ic, filename, fmt, &opts)) < 0)
 
24
+        goto fail;
 
25
     ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above
 
26
 
 
27
     *ic_ptr = ic;
 
28
-- 
 
29
1.7.4.1
 
30