summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2010-01-11 03:17:25 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2010-01-11 03:17:25 +0000
commitf57885fc85da218a3f6892267c93d91eeb4bd03d (patch)
treef7258d664b7558b29e6556509b41887e1272a07b /net-libs
parentBump to TeX Live 2009 (diff)
downloadgentoo-2-f57885fc85da218a3f6892267c93d91eeb4bd03d.tar.gz
gentoo-2-f57885fc85da218a3f6892267c93d91eeb4bd03d.tar.bz2
gentoo-2-f57885fc85da218a3f6892267c93d91eeb4bd03d.zip
Fixed bug #299803.
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/ldns/ChangeLog10
-rw-r--r--net-libs/ldns/files/ldns-1.6.3-r3151-fix-double-free.patch52
-rw-r--r--net-libs/ldns/ldns-1.6.3-r1.ebuild51
3 files changed, 111 insertions, 2 deletions
diff --git a/net-libs/ldns/ChangeLog b/net-libs/ldns/ChangeLog
index 15fa264c6768..e0be68b9d9ec 100644
--- a/net-libs/ldns/ChangeLog
+++ b/net-libs/ldns/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-libs/ldns
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/ldns/ChangeLog,v 1.3 2009/12/04 16:36:34 matsuu Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/ldns/ChangeLog,v 1.4 2010/01/11 03:17:24 matsuu Exp $
+
+*ldns-1.6.3-r1 (11 Jan 2010)
+
+ 11 Jan 2010; MATSUU Takuto <matsuu@gentoo.org> +ldns-1.6.3-r1.ebuild,
+ +files/ldns-1.6.3-r3151-fix-double-free.patch:
+ Fixed bug #299803.
*ldns-1.6.3 (04 Dec 2009)
diff --git a/net-libs/ldns/files/ldns-1.6.3-r3151-fix-double-free.patch b/net-libs/ldns/files/ldns-1.6.3-r3151-fix-double-free.patch
new file mode 100644
index 000000000000..8dd310d430e0
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.6.3-r3151-fix-double-free.patch
@@ -0,0 +1,52 @@
+Index: higher.c
+===================================================================
+--- higher.c (revision 3150)
++++ higher.c (revision 3151)
+@@ -198,7 +198,7 @@
+ break;
+ }
+ }
+- strncpy(addr, word, LDNS_IP6ADDRLEN);
++ strlcpy(addr, word, LDNS_MAX_LINELEN+1);
+ } else {
+ /* la al la la */
+ if (ip6) {
+Index: packet.c
+===================================================================
+--- packet.c (revision 3150)
++++ packet.c (revision 3151)
+@@ -456,17 +456,12 @@
+ {
+ uint16_t rid = 0;
+ #ifdef HAVE_SSL
+- unsigned char *rb;
+- rb = LDNS_XMALLOC(unsigned char, 2);
+- if (RAND_bytes(rb, 2) == 1) {
+- rid = ldns_read_uint16(rb);
+- }
+- LDNS_FREE(rb);
+-#endif
+- if (rid == 0) {
++ if (RAND_bytes((unsigned char*)&rid, 2) != 1) {
+ rid = (uint16_t) random();
+ }
+-
++#else
++ rid = (uint16_t) random();
++#endif
+ ldns_pkt_set_id(packet, rid);
+ }
+
+Index: net.c
+===================================================================
+--- net.c (revision 3150)
++++ net.c (revision 3151)
+@@ -652,6 +652,8 @@
+ if (!data) {
+ return NULL;
+ }
++ /* zero the structure for portability */
++ memset(data, 0, sizeof(struct sockaddr_storage));
+ if (port == 0) {
+ port = LDNS_PORT;
+ }
diff --git a/net-libs/ldns/ldns-1.6.3-r1.ebuild b/net-libs/ldns/ldns-1.6.3-r1.ebuild
new file mode 100644
index 000000000000..285ee733aefa
--- /dev/null
+++ b/net-libs/ldns/ldns-1.6.3-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/ldns/ldns-1.6.3-r1.ebuild,v 1.1 2010/01/11 03:17:24 matsuu Exp $
+
+EAPI="2"
+inherit eutils
+
+DESCRIPTION="ldns is a library with the aim to simplify DNS programing in C"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ssl vim-syntax"
+
+RDEPEND="ssl? ( >=dev-libs/openssl-0.9.7 )"
+DEPEND="${DEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-r3151-fix-double-free.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl sha2) \
+ $(use_with ssl) \
+ --disable-rpath || die "econf failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+ if use doc ; then
+ emake doxygen || die "emake doxygen failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc Changelog README* || die "dodoc failed"
+
+ if use doc ; then
+ dohtml doc/html/* || die "dohtml failed"
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins libdns.vim || die "doins libdns.vim failed"
+ fi
+}