summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-06-30 22:52:43 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-30 23:44:02 +0200
commit66f50e0d7924934d83919eeeeb6f226277e07f30 (patch)
treeeee58ef1d0ab82d3869047d8ee2a45b5f9e28796
parentmedia-libs/mlt: Fix configure with opencv-4 (diff)
downloadgentoo-66f50e0d7924934d83919eeeeb6f226277e07f30.tar.gz
gentoo-66f50e0d7924934d83919eeeeb6f226277e07f30.tar.bz2
gentoo-66f50e0d7924934d83919eeeeb6f226277e07f30.zip
media-libs/mlt: fix null pointer crash in mix transition
Upstream commit dc585bfa5765db418923e7b4802c03bc57733111 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch22
-rw-r--r--media-libs/mlt/mlt-6.20.0-r2.ebuild1
2 files changed, 23 insertions, 0 deletions
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
new file mode 100644
index 00000000000..6bff797c0a9
--- /dev/null
+++ b/media-libs/mlt/files/mlt-6.20.0-nullpointer-crash.patch
@@ -0,0 +1,22 @@
+From b32be6e56e328bb2e580aa13cd757aa211310bae Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Thu, 27 Feb 2020 23:49:07 -0800
+Subject: [PATCH] fix null pointer crash in mix transition
+
+---
+ src/modules/core/transition_mix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modules/core/transition_mix.c b/src/modules/core/transition_mix.c
+index ab7a166d0..89c07a285 100644
+--- a/src/modules/core/transition_mix.c
++++ b/src/modules/core/transition_mix.c
+@@ -139,7 +139,7 @@ static int transition_get_audio( mlt_frame frame_a, void **buffer, mlt_audio_for
+ mlt_frame_get_audio( frame_a, (void**) &buffer_a, format, &frequency_a, &channels_a, &samples_a );
+
+ // Prevent dividing by zero.
+- if ( !channels_a || !channels_b )
++ if ( !channels_a || !channels_b || !buffer_a || !buffer_b )
+ return 1;
+
+ if ( buffer_b == buffer_a )
diff --git a/media-libs/mlt/mlt-6.20.0-r2.ebuild b/media-libs/mlt/mlt-6.20.0-r2.ebuild
index 6edc6c8f9cb..4f93b42419b 100644
--- a/media-libs/mlt/mlt-6.20.0-r2.ebuild
+++ b/media-libs/mlt/mlt-6.20.0-r2.ebuild
@@ -87,6 +87,7 @@ PATCHES=(
"${FILESDIR}"/${P}-qt-5.15.patch
"${FILESDIR}"/${P}-no-gtk2.patch
"${FILESDIR}"/${P}-opencv4.patch
+ "${FILESDIR}"/${P}-nullpointer-crash.patch
)
pkg_setup() {