net-analyzer/hping: Fix memset issue in ip_opt_build().
authorJeroen Roovers <jer@gentoo.org>
Mon, 17 Apr 2017 05:59:20 +0000 (07:59 +0200)
committerJeroen Roovers <jer@gentoo.org>
Mon, 17 Apr 2017 05:59:20 +0000 (07:59 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

net-analyzer/hping/files/hping-3_pre20051105-strlen.patch [new file with mode: 0644]
net-analyzer/hping/hping-3_pre20051105-r6.ebuild [moved from net-analyzer/hping/hping-3_pre20051105-r5.ebuild with 73% similarity]

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 (file)
index 0000000..692cd93
--- /dev/null
@@ -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)
+     {
similarity index 73%
rename from net-analyzer/hping/hping-3_pre20051105-r5.ebuild
rename to net-analyzer/hping/hping-3_pre20051105-r6.ebuild
index 8f8890ed82976177afd58043197ae6f039b1bd66..b173af1353b75b39bfe19232e2c3e278fef2087c 100644 (file)
@@ -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 \