~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-10-01 00:22:07 UTC
  • mfrom: (1.3.8 sid)
  • Revision ID: package-import@ubuntu.com-20111001002207-tnxz39i0rwr5ufy9
Tags: 4:0.7.2-1ubuntu1
* Merge from debian, remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg,
    lame, xvid, x264  (all in universe)
  - not installing into multiarch directories
* This new upstream release has basically merged in all 70 patches that
  are present in 4:0.7.1-7ubuntu2, plus some additional, similarily
  focused ones.

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
 
1.7.4.1
29