commit:     a5ebb986de32e702fece9392cc511a6e2d31f08a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 13:01:53 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 13:01:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5ebb986

net-libs/openslp: EAPI bump, add Fedora patch for CVE 2016-4912

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/openslp-2.0.0-CVE-2016-4912.patch        | 15 ++++++++
 net-libs/openslp/openslp-2.0.0-r2.ebuild           | 42 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch 
b/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch
new file mode 100644
index 0000000000..d8a0eca0d3
--- /dev/null
+++ b/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch
@@ -0,0 +1,15 @@
+Source: 
https://src.fedoraproject.org/cgit/rpms/openslp.git/plain/openslp-2.0.0-null-pointer-deref.patch
+See also https://bugs.gentoo.org/show_bug.cgi?id=583396
+
+diff -up openslp-2.0.0/common/slp_xmalloc.c.orig 
openslp-2.0.0/common/slp_xmalloc.c
+--- openslp-2.0.0/common/slp_xmalloc.c.orig    2012-12-07 01:52:08.000000000 
+0100
++++ openslp-2.0.0/common/slp_xmalloc.c 2016-05-23 12:58:57.953532979 +0200
+@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
+       if (x->size != size)
+       {
+          newptr = _xmalloc(file, line, size);
++         if (newptr == 0)
++            return 0;
+          memcpy(newptr, ptr, x->size);
+          _xfree(file, line, x);
+       }

diff --git a/net-libs/openslp/openslp-2.0.0-r2.ebuild 
b/net-libs/openslp/openslp-2.0.0-r2.ebuild
new file mode 100644
index 0000000000..43d36bd99b
--- /dev/null
+++ b/net-libs/openslp/openslp-2.0.0-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools systemd
+
+DESCRIPTION="An open-source implementation of Service Location Protocol"
+HOMEPAGE="http://www.openslp.org/";
+SRC_URI="mirror://sourceforge/openslp/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh 
~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="libressl"
+RESTRICT="test"
+
+DEPEND="
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.0.0-cflags.patch
+       "${FILESDIR}"/${PN}-2.0.0-CVE-2016-4912.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_install() {
+       make DESTDIR="${D}" install || die "make install failed"
+       dodoc AUTHORS FAQ ChangeLog NEWS README* THANKS
+       rm -rfv "${D}"/usr/doc
+       dohtml -r .
+       newinitd "${FILESDIR}"/slpd-init slpd
+       systemd_dounit "${FILESDIR}"/slpd.service
+}

Reply via email to