1 |
commit: c34bd91f35dce053ca34d24712c227c0db833f5e |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 4 17:47:13 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 4 17:47:13 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c34bd91f |
7 |
|
8 |
media-plugins/alsa-plugins: Fixed a double free issue. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/673792 |
11 |
Package-Manager: Portage-2.3.54, Repoman-2.3.12 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
|
14 |
...s-1.1.7.ebuild => alsa-plugins-1.1.7-r1.ebuild} | 6 +++- |
15 |
.../files/alsa-plugins-1.1.7-double_free_fix.patch | 34 ++++++++++++++++++++++ |
16 |
2 files changed, 39 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/media-plugins/alsa-plugins/alsa-plugins-1.1.7.ebuild b/media-plugins/alsa-plugins/alsa-plugins-1.1.7-r1.ebuild |
19 |
similarity index 96% |
20 |
rename from media-plugins/alsa-plugins/alsa-plugins-1.1.7.ebuild |
21 |
rename to media-plugins/alsa-plugins/alsa-plugins-1.1.7-r1.ebuild |
22 |
index 2eff3aacc81..f97cc166249 100644 |
23 |
--- a/media-plugins/alsa-plugins/alsa-plugins-1.1.7.ebuild |
24 |
+++ b/media-plugins/alsa-plugins/alsa-plugins-1.1.7-r1.ebuild |
25 |
@@ -1,4 +1,4 @@ |
26 |
-# Copyright 1999-2018 Gentoo Authors |
27 |
+# Copyright 1999-2019 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
EAPI=7 |
31 |
@@ -30,6 +30,10 @@ RDEPEND=" |
32 |
DEPEND="${RDEPEND}" |
33 |
BDEPEND="virtual/pkgconfig" |
34 |
|
35 |
+PATCHES=( |
36 |
+ "${FILESDIR}"/${P}-double_free_fix.patch |
37 |
+) |
38 |
+ |
39 |
src_prepare() { |
40 |
default |
41 |
|
42 |
|
43 |
diff --git a/media-plugins/alsa-plugins/files/alsa-plugins-1.1.7-double_free_fix.patch b/media-plugins/alsa-plugins/files/alsa-plugins-1.1.7-double_free_fix.patch |
44 |
new file mode 100644 |
45 |
index 00000000000..9b3a81599b3 |
46 |
--- /dev/null |
47 |
+++ b/media-plugins/alsa-plugins/files/alsa-plugins-1.1.7-double_free_fix.patch |
48 |
@@ -0,0 +1,34 @@ |
49 |
+From a4e7e1282c57a2f4e83afe9a4008042d8b4c5bb9 Mon Sep 17 00:00:00 2001 |
50 |
+From: Jaroslav Kysela <perex@×××××.cz> |
51 |
+Date: Tue, 23 Oct 2018 09:32:46 +0200 |
52 |
+Subject: [PATCH] a52_close: set slave to NULL to avoid double pcm free in |
53 |
+ open fcn |
54 |
+ |
55 |
+Signed-off-by: Jaroslav Kysela <perex@×××××.cz> |
56 |
+--- |
57 |
+ a52/pcm_a52.c | 7 +++++-- |
58 |
+ 1 file changed, 5 insertions(+), 2 deletions(-) |
59 |
+ |
60 |
+diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c |
61 |
+index e431fd0..b005bc2 100644 |
62 |
+--- a/a52/pcm_a52.c |
63 |
++++ b/a52/pcm_a52.c |
64 |
+@@ -654,10 +654,13 @@ static int a52_poll_revents(snd_pcm_ioplug_t *io, struct pollfd *pfd, |
65 |
+ static int a52_close(snd_pcm_ioplug_t *io) |
66 |
+ { |
67 |
+ struct a52_ctx *rec = io->private_data; |
68 |
++ snd_pcm_t *slave = rec->slave; |
69 |
+ |
70 |
+ a52_free(rec); |
71 |
+- if (rec->slave) |
72 |
+- return snd_pcm_close(rec->slave); |
73 |
++ if (slave) { |
74 |
++ rec->slave = NULL; |
75 |
++ return snd_pcm_close(slave); |
76 |
++ } |
77 |
+ return 0; |
78 |
+ } |
79 |
+ |
80 |
+-- |
81 |
+1.7.11.7 |
82 |
+ |