summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2017-04-17 07:59:20 +0200
committerJeroen Roovers <jer@gentoo.org>2017-04-17 07:59:20 +0200
commitbdf91376c408d86d3c177b2a5e5a8a10a6551b80 (patch)
treeaaf392a5120edeabb59048a07e4ccfc03457b11c /net-analyzer
parentnet-analyzer/ipv6toolkit: Old. (diff)
downloadgentoo-bdf91376c408d86d3c177b2a5e5a8a10a6551b80.tar.gz
gentoo-bdf91376c408d86d3c177b2a5e5a8a10a6551b80.tar.bz2
gentoo-bdf91376c408d86d3c177b2a5e5a8a10a6551b80.zip
net-analyzer/hping: Fix memset issue in ip_opt_build().
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-strlen.patch11
-rw-r--r--net-analyzer/hping/hping-3_pre20051105-r6.ebuild (renamed from net-analyzer/hping/hping-3_pre20051105-r5.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 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
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 \