summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-01-23 16:04:21 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-01-23 16:04:21 +0000
commit9d937e6be698c304f6159df056d705c55b4bf9ed (patch)
tree3198a345ffdda02daa2253fc61e9cbf32a9a9e1a /media-sound/shell-fm
parentStable for amd64, wrt bug #361335 (diff)
downloadgentoo-2-9d937e6be698c304f6159df056d705c55b4bf9ed.tar.gz
gentoo-2-9d937e6be698c304f6159df056d705c55b4bf9ed.tar.bz2
gentoo-2-9d937e6be698c304f6159df056d705c55b4bf9ed.zip
Patch to prevent (double free) crash wrt #392413 by "nzqr"
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/shell-fm')
-rw-r--r--media-sound/shell-fm/ChangeLog10
-rw-r--r--media-sound/shell-fm/files/shell-fm-0.8-doublefree.patch24
-rw-r--r--media-sound/shell-fm/shell-fm-0.8-r1.ebuild43
3 files changed, 75 insertions, 2 deletions
diff --git a/media-sound/shell-fm/ChangeLog b/media-sound/shell-fm/ChangeLog
index e02892781ec0..cfd8bd2438d9 100644
--- a/media-sound/shell-fm/ChangeLog
+++ b/media-sound/shell-fm/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/shell-fm
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/shell-fm/ChangeLog,v 1.15 2011/05/24 21:12:43 radhermit Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/shell-fm/ChangeLog,v 1.16 2012/01/23 16:04:21 ssuominen Exp $
+
+*shell-fm-0.8-r1 (23 Jan 2012)
+
+ 23 Jan 2012; Samuli Suominen <ssuominen@gentoo.org> +shell-fm-0.8-r1.ebuild,
+ +files/shell-fm-0.8-doublefree.patch:
+ Patch to prevent (double free) crash wrt #392413 by "nzqr"
*shell-fm-0.8 (24 May 2011)
diff --git a/media-sound/shell-fm/files/shell-fm-0.8-doublefree.patch b/media-sound/shell-fm/files/shell-fm-0.8-doublefree.patch
new file mode 100644
index 000000000000..5054ee1ad024
--- /dev/null
+++ b/media-sound/shell-fm/files/shell-fm-0.8-doublefree.patch
@@ -0,0 +1,24 @@
+Fix double free crash: http://bugs.gentoo.org/392413
+
+--- source/sckif.c
++++ source/sckif.c
+@@ -39,6 +39,8 @@
+
+ #include "split.h"
+
++#include "ropen.h" /* fshutdown */
++
+ struct hash track;
+
+ static int stcpsck = -1, sunixsck = -1;
+@@ -191,9 +193,7 @@
+
+ if(disconnect) {
+ debug("removing client\n");
+- shutdown(SHUT_RDWR, client_socket);
+- close(client_socket);
+- fclose(fd);
++ fshutdown(& fd);
+
+ remove_handle(client_socket);
+ }
diff --git a/media-sound/shell-fm/shell-fm-0.8-r1.ebuild b/media-sound/shell-fm/shell-fm-0.8-r1.ebuild
new file mode 100644
index 000000000000..91451cd26491
--- /dev/null
+++ b/media-sound/shell-fm/shell-fm-0.8-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/shell-fm/shell-fm-0.8-r1.ebuild,v 1.1 2012/01/23 16:04:21 ssuominen Exp $
+
+EAPI=4
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="A lightweight console based player for Last.FM radio streams"
+HOMEPAGE="http://nex.scrapping.cc/shell-fm/"
+SRC_URI="https://github.com/jkramer/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
+IUSE=""
+
+RDEPEND="media-libs/libao
+ media-libs/libmad
+ media-libs/taglib"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ sys-apps/sed"
+
+src_unpack() {
+ unpack ${A}
+ mv *-${PN}-* "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-doublefree.patch #392413
+
+ sed -i -e 's:-Os::' source/Makefile || die
+
+ tc-export CC AR
+ use ppc && append-flags -DWORDS_BIGENDIAN=1
+}
+
+src_install() {
+ dobin source/${PN}
+ doman manual/${PN}.1
+ exeinto /usr/share/${PN}/scripts
+ doexe scripts/{*.sh,*.pl,zcontrol}
+}