Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mlt/, media-libs/mlt/files/
Date: Tue, 30 Jun 2020 21:44:30
Message-Id: 1593553442.66f50e0d7924934d83919eeeeb6f226277e07f30.asturm@gentoo
1 commit: 66f50e0d7924934d83919eeeeb6f226277e07f30
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 30 20:52:43 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 30 21:44:02 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66f50e0d
7
8 media-libs/mlt: fix null pointer crash in mix transition
9
10 Upstream commit dc585bfa5765db418923e7b4802c03bc57733111
11
12 Package-Manager: Portage-2.3.103, Repoman-2.3.23
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../mlt/files/mlt-6.20.0-nullpointer-crash.patch | 22 ++++++++++++++++++++++
16 media-libs/mlt/mlt-6.20.0-r2.ebuild | 1 +
17 2 files changed, 23 insertions(+)
18
19 diff --git a/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch b/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch
20 new file mode 100644
21 index 00000000000..6bff797c0a9
22 --- /dev/null
23 +++ b/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch
24 @@ -0,0 +1,22 @@
25 +From b32be6e56e328bb2e580aa13cd757aa211310bae Mon Sep 17 00:00:00 2001
26 +From: Dan Dennedy <dan@×××××××.org>
27 +Date: Thu, 27 Feb 2020 23:49:07 -0800
28 +Subject: [PATCH] fix null pointer crash in mix transition
29 +
30 +---
31 + src/modules/core/transition_mix.c | 2 +-
32 + 1 file changed, 1 insertion(+), 1 deletion(-)
33 +
34 +diff --git a/src/modules/core/transition_mix.c b/src/modules/core/transition_mix.c
35 +index ab7a166d0..89c07a285 100644
36 +--- a/src/modules/core/transition_mix.c
37 ++++ b/src/modules/core/transition_mix.c
38 +@@ -139,7 +139,7 @@ static int transition_get_audio( mlt_frame frame_a, void **buffer, mlt_audio_for
39 + mlt_frame_get_audio( frame_a, (void**) &buffer_a, format, &frequency_a, &channels_a, &samples_a );
40 +
41 + // Prevent dividing by zero.
42 +- if ( !channels_a || !channels_b )
43 ++ if ( !channels_a || !channels_b || !buffer_a || !buffer_b )
44 + return 1;
45 +
46 + if ( buffer_b == buffer_a )
47
48 diff --git a/media-libs/mlt/mlt-6.20.0-r2.ebuild b/media-libs/mlt/mlt-6.20.0-r2.ebuild
49 index 6edc6c8f9cb..4f93b42419b 100644
50 --- a/media-libs/mlt/mlt-6.20.0-r2.ebuild
51 +++ b/media-libs/mlt/mlt-6.20.0-r2.ebuild
52 @@ -87,6 +87,7 @@ PATCHES=(
53 "${FILESDIR}"/${P}-qt-5.15.patch
54 "${FILESDIR}"/${P}-no-gtk2.patch
55 "${FILESDIR}"/${P}-opencv4.patch
56 + "${FILESDIR}"/${P}-nullpointer-crash.patch
57 )
58
59 pkg_setup() {