summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2009-12-10 16:22:58 +0000
committerJeroen Roovers <jer@gentoo.org>2009-12-10 16:22:58 +0000
commit21690d24d2c75a9706f7a762885c13f76dfd5aa6 (patch)
treef858b0c75cd9e4caa4f62db5ac0952e824e676f7 /net-libs
parentx86 stable, bug 292455 (diff)
downloadgentoo-2-21690d24d2c75a9706f7a762885c13f76dfd5aa6.tar.gz
gentoo-2-21690d24d2c75a9706f7a762885c13f76dfd5aa6.tar.bz2
gentoo-2-21690d24d2c75a9706f7a762885c13f76dfd5aa6.zip
Apply Debian patch (bug #296417).
(Portage version: 2.2_rc57/cvs/Linux i686)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnet/ChangeLog6
-rw-r--r--net-libs/libnet/files/libnet-1.1.4-zero-pointers-after-free.patch32
-rw-r--r--net-libs/libnet/libnet-1.1.4.ebuild10
3 files changed, 46 insertions, 2 deletions
diff --git a/net-libs/libnet/ChangeLog b/net-libs/libnet/ChangeLog
index 7226423d875f..3a3c2622ea1e 100644
--- a/net-libs/libnet/ChangeLog
+++ b/net-libs/libnet/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-libs/libnet
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.51 2009/12/09 19:29:18 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.52 2009/12/10 16:22:57 jer Exp $
+
+ 10 Dec 2009; Jeroen Roovers <jer@gentoo.org> libnet-1.1.4.ebuild,
+ +files/libnet-1.1.4-zero-pointers-after-free.patch:
+ Apply Debian patch (bug #296417).
09 Dec 2009; nixnut <nixnut@gentoo.org> libnet-1.1.4.ebuild:
ppc stable #289857
diff --git a/net-libs/libnet/files/libnet-1.1.4-zero-pointers-after-free.patch b/net-libs/libnet/files/libnet-1.1.4-zero-pointers-after-free.patch
new file mode 100644
index 000000000000..0fd81d7377f4
--- /dev/null
+++ b/net-libs/libnet/files/libnet-1.1.4-zero-pointers-after-free.patch
@@ -0,0 +1,32 @@
+http://ftp.de.debian.org/debian/pool/main/libn/libnet/libnet_1.1.4-2.diff.gz
+
+
+NULLify pointers after free()ing them to avoid double free()s.
+Index: libnet-1.1.4/src/libnet_if_addr.c
+===================================================================
+--- libnet-1.1.4.orig/src/libnet_if_addr.c 2009-06-27 14:48:56.084093427 +0300
++++ libnet-1.1.4/src/libnet_if_addr.c 2009-06-27 14:49:30.081249393 +0300
+@@ -240,6 +240,7 @@
+ {
+ /* fix memory leak */
+ free(al->device);
++ al->device = NULL;
+ }
+ if ((al->device = strdup(device)) == NULL)
+ {
+@@ -406,6 +407,7 @@
+ for (i = 0; i < c; i++)
+ {
+ free(al[i].device);
++ al[i].device = NULL;
+ }
+ return (1);
+
+@@ -413,6 +415,7 @@
+ for (i = 0; i < c; i++)
+ {
+ free(al[i].device);
++ al[i].device = NULL;
+ }
+ return (-1);
+ }
diff --git a/net-libs/libnet/libnet-1.1.4.ebuild b/net-libs/libnet/libnet-1.1.4.ebuild
index 830f93db8d64..041bf6f66ca4 100644
--- a/net-libs/libnet/libnet-1.1.4.ebuild
+++ b/net-libs/libnet/libnet-1.1.4.ebuild
@@ -1,6 +1,10 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/libnet-1.1.4.ebuild,v 1.6 2009/12/09 19:29:18 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/libnet-1.1.4.ebuild,v 1.7 2009/12/10 16:22:57 jer Exp $
+
+EAPI="2"
+
+inherit eutils
DESCRIPTION="library to provide an API for commonly used low-level network functions (mainly packet injection)"
HOMEPAGE="http://libnet-dev.sourceforge.net/"
@@ -14,6 +18,10 @@ IUSE="doc"
DEPEND="sys-devel/autoconf"
RDEPEND=""
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-zero-pointers-after-free.patch
+}
+
src_install(){
emake DESTDIR="${D}" install || die "Failed to install"