commit: bdf91376c408d86d3c177b2a5e5a8a10a6551b80
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 17 05:59:20 2017 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 05:59:20 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdf91376
net-analyzer/hping: Fix memset issue in ip_opt_build().
Package-Manager: Portage-2.3.5, Repoman-2.3.2
.../hping/files/hping-3_pre20051105-strlen.patch | 11 +++++++
...105-r5.ebuild => hping-3_pre20051105-r6.ebuild} | 34 +++++++++++++---------
2 files changed, 31 insertions(+), 14 deletions(-)
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 00000000000..692cd93102f
--- /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 8f8890ed829..b173af1353b 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 \