From: Jeroen Roovers Date: Mon, 17 Apr 2017 05:59:20 +0000 (+0200) Subject: net-analyzer/hping: Fix memset issue in ip_opt_build(). X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=bdf91376c408d86d3c177b2a5e5a8a10a6551b80;p=gentoo.git net-analyzer/hping: Fix memset issue in ip_opt_build(). Package-Manager: Portage-2.3.5, Repoman-2.3.2 --- diff --git a/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch new file mode 100644 index 000000000000..692cd93102fb --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch @@ -0,0 +1,11 @@ +--- a/ip_opt_build.c ++++ b/ip_opt_build.c +@@ -25,7 +25,7 @@ + unsigned char optlen = 0; + unsigned long ip; + +- memset(ip_opt, 1, sizeof(ip_opt)); ++ memset(ip_opt, 1, strlen(ip_opt)); + + if (opt_lsrr) + { diff --git a/net-analyzer/hping/hping-3_pre20051105-r5.ebuild b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild similarity index 73% rename from net-analyzer/hping/hping-3_pre20051105-r5.ebuild rename to net-analyzer/hping/hping-3_pre20051105-r6.ebuild index 8f8890ed8297..b173af1353b7 100644 --- a/net-analyzer/hping/hping-3_pre20051105-r5.ebuild +++ b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild @@ -1,8 +1,7 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 - +EAPI=6 inherit eutils multilib toolchain-funcs MY_P="${PN}${PV//_pre/-}" @@ -17,19 +16,26 @@ IUSE="tcl" S="${WORKDIR}/${MY_P}" -DEPEND="net-libs/libpcap - tcl? ( dev-lang/tcl:0= )" -RDEPEND="${DEPEND}" +DEPEND=" + net-libs/libpcap + tcl? ( dev-lang/tcl:0= ) +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P}.patch + "${FILESDIR}"/bytesex.h.patch + "${FILESDIR}"/${P}-tcl.patch + "${FILESDIR}"/${P}-ldflags.patch + "${FILESDIR}"/${P}-libtcl.patch + "${FILESDIR}"/${P}-scan-overflow.patch + "${FILESDIR}"/${P}-tclsh-proper-escaping.patch + "${FILESDIR}"/${P}-strlen.patch +) src_prepare() { - epatch \ - "${FILESDIR}"/${P}.patch \ - "${FILESDIR}"/bytesex.h.patch \ - "${FILESDIR}"/${P}-tcl.patch \ - "${FILESDIR}"/${P}-ldflags.patch \ - "${FILESDIR}"/${P}-libtcl.patch \ - "${FILESDIR}"/${P}-scan-overflow.patch \ - "${FILESDIR}"/${P}-tclsh-proper-escaping.patch # bug #486664 + default # Correct hard coded values sed -i Makefile.in \