summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-11-30 21:30:45 +0000
committerJeroen Roovers <jer@gentoo.org>2010-11-30 21:30:45 +0000
commite8517df0195e274f103071008dae91fe409c6f09 (patch)
tree09c29ba200890b154114f7c90055859764380ba9 /net-analyzer
parentamd64/x86 stable, bug #305781 (diff)
downloadgentoo-2-e8517df0195e274f103071008dae91fe409c6f09.tar.gz
gentoo-2-e8517df0195e274f103071008dae91fe409c6f09.tar.bz2
gentoo-2-e8517df0195e274f103071008dae91fe409c6f09.zip
Fix overflow in scan.c (bug #340251). Simplify src_configure and export CC there. Set RDEPEND.
(Portage version: 2.2.0_alpha6/cvs/Linux i686)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/hping/ChangeLog10
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch11
-rw-r--r--net-analyzer/hping/hping-3_pre20051105-r1.ebuild60
-rw-r--r--net-analyzer/hping/hping-3_pre20051105-r3.ebuild (renamed from net-analyzer/hping/hping-3_pre20051105-r2.ebuild)12
4 files changed, 26 insertions, 67 deletions
diff --git a/net-analyzer/hping/ChangeLog b/net-analyzer/hping/ChangeLog
index 575419ddda0b..947b8ddd8c59 100644
--- a/net-analyzer/hping/ChangeLog
+++ b/net-analyzer/hping/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/hping
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hping/ChangeLog,v 1.49 2010/05/11 04:08:17 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hping/ChangeLog,v 1.50 2010/11/30 21:30:45 jer Exp $
+
+*hping-3_pre20051105-r3 (30 Nov 2010)
+
+ 30 Nov 2010; Jeroen Roovers <jer@gentoo.org> -hping-3_pre20051105-r1.ebuild,
+ -hping-3_pre20051105-r2.ebuild, +hping-3_pre20051105-r3.ebuild,
+ +files/hping-3_pre20051105-scan-overflow.patch:
+ Fix overflow in scan.c (bug #340251). Simplify src_configure and export CC
+ there. Set RDEPEND.
*hping-3_pre20051105-r2 (11 May 2010)
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch
new file mode 100644
index 000000000000..003424b609a0
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch
@@ -0,0 +1,11 @@
+--- a/scan.c 2003-10-22 12:41:00.000000000 +0200
++++ b/scan.c 2010-11-30 22:19:23.000000000 +0100
+@@ -456,7 +456,7 @@
+ continue;
+ /* time to copy headers in a safe place */
+ p = packet+linkhdr_size+iphdrlen;
+- memcpy(&icmp, p, sizeof(subtcp));
++ memcpy(&icmp, p, sizeof(icmp));
+ p += sizeof(icmp);
+ memcpy(&subip, p, sizeof(ip));
+ p += sizeof(ip);
diff --git a/net-analyzer/hping/hping-3_pre20051105-r1.ebuild b/net-analyzer/hping/hping-3_pre20051105-r1.ebuild
deleted file mode 100644
index b6794bd64ad1..000000000000
--- a/net-analyzer/hping/hping-3_pre20051105-r1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hping/hping-3_pre20051105-r1.ebuild,v 1.3 2009/12/23 14:02:25 jer Exp $
-
-inherit eutils multilib toolchain-funcs
-
-MY_P="${PN}${PV//_pre/-}"
-DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer"
-HOMEPAGE="http://www.hping.org"
-SRC_URI="http://www.hping.org/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
-IUSE="tcl"
-
-S="${WORKDIR}/${MY_P}"
-
-DEPEND="net-libs/libpcap
- tcl? ( dev-lang/tcl )"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch \
- "${FILESDIR}"/${P}.patch \
- "${FILESDIR}"/bytesex.h.patch \
- "${FILESDIR}"/${P}-tcl.patch \
- "${FILESDIR}"/${P}-ldflags.patch \
- "${FILESDIR}"/${P}-libtcl.patch
-
- # Correct hard coded values
- sed -i Makefile.in \
- -e "9s:gcc:$(tc-getCC):" \
- -e "10s:/usr/bin/ar:$(tc-getAR):" \
- -e "11s:/usr/bin/ranlib:$(tc-getRANLIB):" \
- -e "s:/usr/local/lib:/usr/$(get_libdir):g" \
- -e "12s:-O2:${CFLAGS}:"
-}
-
-src_compile() {
- myconf=""
- use tcl || myconf="--no-tcl"
-
- # Not an autotools type configure:
- sh configure ${myconf} || die "configure failed"
-
- emake DEBUG="" || die "emake failed"
-}
-
-src_install () {
- dosbin hping3
- dosym /usr/sbin/hping3 /usr/sbin/hping
- dosym /usr/sbin/hping3 /usr/sbin/hping2
-
- doman docs/hping3.8
-
- dodoc INSTALL NEWS README TODO AUTHORS BUGS CHANGES
-}
diff --git a/net-analyzer/hping/hping-3_pre20051105-r2.ebuild b/net-analyzer/hping/hping-3_pre20051105-r3.ebuild
index dac37b9a54b4..7467bb10738f 100644
--- a/net-analyzer/hping/hping-3_pre20051105-r2.ebuild
+++ b/net-analyzer/hping/hping-3_pre20051105-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hping/hping-3_pre20051105-r2.ebuild,v 1.2 2010/05/11 15:43:01 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hping/hping-3_pre20051105-r3.ebuild,v 1.1 2010/11/30 21:30:45 jer Exp $
EAPI="2"
@@ -20,6 +20,7 @@ S="${WORKDIR}/${MY_P}"
DEPEND="net-libs/libpcap
tcl? ( dev-lang/tcl )"
+RDEPEND="${DEPEND}"
src_prepare() {
epatch \
@@ -27,7 +28,8 @@ src_prepare() {
"${FILESDIR}"/bytesex.h.patch \
"${FILESDIR}"/${P}-tcl.patch \
"${FILESDIR}"/${P}-ldflags.patch \
- "${FILESDIR}"/${P}-libtcl.patch
+ "${FILESDIR}"/${P}-libtcl.patch \
+ "${FILESDIR}"/${P}-scan-overflow.patch
# Correct hard coded values
sed -i Makefile.in \
@@ -46,18 +48,16 @@ src_prepare() {
}
src_configure() {
- myconf=""
- use tcl || myconf="--no-tcl"
+ tc-export CC
# Not an autotools type configure:
- sh configure ${myconf} || die "configure failed"
+ sh configure $(use tcl || echo --no-tcl) || die "configure failed"
}
src_compile() {
emake \
DEBUG="" \
"CFLAGS=${CFLAGS}" \
- "CC=$(tc-getCC)" \
"AR=$(tc-getAR)" \
"RANLIB=$(tc-getRANLIB)" \
"LIBDIR=$(get_libdir)" \