summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch')
-rw-r--r--meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch99
1 files changed, 0 insertions, 99 deletions
diff --git a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch b/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch
deleted file mode 100644
index 94213a74ef..0000000000
--- a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1Upstream-Status: Backport
2CVE: CVE-2014-9676
3
4Backport patch to fix CVE-2014-9676.
5
6https://security-tracker.debian.org/tracker/CVE-2014-9676
7https://git.libav.org/?p=libav.git;a=commit;h=b3f04657368a32a9903406395f865e230b1de348
8
9Signed-off-by: Kai Kang <kai.kang@windriver.com>
10---
11From b3f04657368a32a9903406395f865e230b1de348 Mon Sep 17 00:00:00 2001
12From: Luca Barbato <lu_zero@gentoo.org>
13Date: Mon, 5 Jan 2015 10:40:41 +0100
14Subject: [PATCH] segment: Fix the failure paths
15
16A failure in segment_end() or segment_start() would lead to freeing
17a dangling pointer and in general further calls to seg_write_packet()
18or to seg_write_trailer() would have the same faulty behaviour.
19
20CC: libav-stable@libav.org
21Reported-By: luodalongde@gmail.com
22---
23 libavformat/segment.c | 32 ++++++++++++++++++++------------
24 1 file changed, 20 insertions(+), 12 deletions(-)
25
26diff --git a/libavformat/segment.c b/libavformat/segment.c
27index 52da6b9..bcfd1f9 100644
28--- a/libavformat/segment.c
29+++ b/libavformat/segment.c
30@@ -184,6 +184,13 @@ static void close_null_ctx(AVIOContext *pb)
31 av_free(pb);
32 }
33
34+static void seg_free_context(SegmentContext *seg)
35+{
36+ avio_closep(&seg->pb);
37+ avformat_free_context(seg->avf);
38+ seg->avf = NULL;
39+}
40+
41 static int seg_write_header(AVFormatContext *s)
42 {
43 SegmentContext *seg = s->priv_data;
44@@ -265,12 +272,9 @@ static int seg_write_header(AVFormatContext *s)
45 }
46
47 fail:
48- if (ret) {
49- if (seg->list)
50- avio_close(seg->pb);
51- if (seg->avf)
52- avformat_free_context(seg->avf);
53- }
54+ if (ret < 0)
55+ seg_free_context(seg);
56+
57 return ret;
58 }
59
60@@ -282,6 +286,9 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
61 int64_t end_pts = seg->recording_time * seg->number;
62 int ret, can_split = 1;
63
64+ if (!oc)
65+ return AVERROR(EINVAL);
66+
67 if (seg->has_video) {
68 can_split = st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
69 pkt->flags & AV_PKT_FLAG_KEY;
70@@ -322,11 +329,8 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
71 ret = ff_write_chained(oc, pkt->stream_index, pkt, s);
72
73 fail:
74- if (ret < 0) {
75- if (seg->list)
76- avio_close(seg->pb);
77- avformat_free_context(oc);
78- }
79+ if (ret < 0)
80+ seg_free_context(seg);
81
82 return ret;
83 }
84@@ -335,7 +339,11 @@ static int seg_write_trailer(struct AVFormatContext *s)
85 {
86 SegmentContext *seg = s->priv_data;
87 AVFormatContext *oc = seg->avf;
88- int ret;
89+ int ret = 0;
90+
91+ if (!oc)
92+ goto fail;
93+
94 if (!seg->write_header_trailer) {
95 if ((ret = segment_end(oc, 0)) < 0)
96 goto fail;
97--
982.4.1.314.g9532ead
99