summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Faulhammer <fauli@gentoo.org>2011-01-12 09:35:47 +0000
committerChristian Faulhammer <fauli@gentoo.org>2011-01-12 09:35:47 +0000
commit9336d4700f3d9f7b7c228c272c9ab9360fcb913a (patch)
tree0c2171926cc6f60db68fe3c442dd64c3548c6525 /dev-lang/erlang
parentAdded missing DEPEND on bc (diff)
downloadgentoo-2-9336d4700f3d9f7b7c228c272c9ab9360fcb913a.tar.gz
gentoo-2-9336d4700f3d9f7b7c228c272c9ab9360fcb913a.tar.bz2
gentoo-2-9336d4700f3d9f7b7c228c272c9ab9360fcb913a.zip
Add fix from PLD Linux for buffer overflow detected by FORTIFY_SOURCE=2 on 64bit arches. Research done by Arkadiusz Miskiewicz <arekm AT pld-linux DOT org> for bug 348559
(Portage version: 2.1.9.25/cvs/Linux i686)
Diffstat (limited to 'dev-lang/erlang')
-rw-r--r--dev-lang/erlang/ChangeLog10
-rw-r--r--dev-lang/erlang/erlang-14.2.1.ebuild5
-rw-r--r--dev-lang/erlang/files/erlang-14.2.1-fortify.patch19
3 files changed, 30 insertions, 4 deletions
diff --git a/dev-lang/erlang/ChangeLog b/dev-lang/erlang/ChangeLog
index 4ec052483f28..f06125ffef23 100644
--- a/dev-lang/erlang/ChangeLog
+++ b/dev-lang/erlang/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/erlang
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/ChangeLog,v 1.204 2010/12/12 12:12:35 fauli Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/ChangeLog,v 1.205 2011/01/12 09:35:47 fauli Exp $
+
+ 12 Jan 2011; Christian Faulhammer <fauli@gentoo.org> erlang-14.2.1.ebuild,
+ +files/erlang-14.2.1-fortify.patch:
+ Add fix from PLD Linux for buffer overflow detected by FORTIFY_SOURCE=2 in
+ on 64bit arches. Research done by Arkadiusz Miskiewicz <arekm AT pld-linux DOT
+ org> for bug 348559
*erlang-14.2.1 (12 Dec 2010)
diff --git a/dev-lang/erlang/erlang-14.2.1.ebuild b/dev-lang/erlang/erlang-14.2.1.ebuild
index 8976afb2b5a9..7366bbf50aab 100644
--- a/dev-lang/erlang/erlang-14.2.1.ebuild
+++ b/dev-lang/erlang/erlang-14.2.1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-14.2.1.ebuild,v 1.1 2010/12/12 12:12:35 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-14.2.1.ebuild,v 1.2 2011/01/12 09:35:47 fauli Exp $
EAPI=3
WX_GTK_VER="2.8"
@@ -52,6 +52,7 @@ pkg_setup() {
}
src_prepare() {
+ epatch "${FILESDIR}/${P}-fortify.patch" # bug 348559
use odbc || sed -i 's: odbc : :' lib/Makefile
# bug 263129, don't ignore LDFLAGS, reported upstream
diff --git a/dev-lang/erlang/files/erlang-14.2.1-fortify.patch b/dev-lang/erlang/files/erlang-14.2.1-fortify.patch
new file mode 100644
index 000000000000..4fb771187ee6
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-14.2.1-fortify.patch
@@ -0,0 +1,19 @@
+
+Erlang 14B01 (aka 14.2.1 in Gentoo) fails with 64bit arches and FORTIFY_SOURCE=2 or greater, consisting of a buffer overflow warning.
+
+Upstream report: http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:2135:bdnooaggpdnbokaboakj
+Taken from PLD Linux: http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/erlang/erlang-fortify.patch
+
+http://bugs.gentoo.org/show_bug.cgi?id=348559
+
+--- otp_src_R14B01/erts/emulator/drivers/common/efile_drv.c
++++ otp_src_R14B01/erts/emulator/drivers/common/efile_drv.c
+@@ -174,7 +174,7 @@
+
+ #else
+ # define FILENAME_BYTELEN(Str) strlen(Str)
+-# define FILENAME_COPY(To,From) strcpy(To,From)
++# define FILENAME_COPY(To,From) memcpy(To,From,strlen(From)+1)
+ # define FILENAME_CHARSIZE 1
+ #endif
+