summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2013-01-04 09:55:26 +0000
committerRichard Yao <ryao@gentoo.org>2013-01-04 09:55:26 +0000
commitbe5f843bf4f2689e243032f127e85f1df108bd3c (patch)
tree0c09d16a2d863a9bbad5b9e4df788091ef6b264c /app-editors
parentRevert mod_python mask. (diff)
downloadgentoo-2-be5f843bf4f2689e243032f127e85f1df108bd3c.tar.gz
gentoo-2-be5f843bf4f2689e243032f127e85f1df108bd3c.tar.bz2
gentoo-2-be5f843bf4f2689e243032f127e85f1df108bd3c.zip
Take over maintainership and fix buffer overflow, bug #450064
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/bvi/ChangeLog10
-rw-r--r--app-editors/bvi/bvi-1.3.2-r1.ebuild40
-rw-r--r--app-editors/bvi/bvi-1.3.2.ebuild5
-rw-r--r--app-editors/bvi/files/bvi-1.3.2-fix-buffer-overflow.patch22
-rw-r--r--app-editors/bvi/metadata.xml4
5 files changed, 75 insertions, 6 deletions
diff --git a/app-editors/bvi/ChangeLog b/app-editors/bvi/ChangeLog
index 6ba7346e7f6b..59b8c2c3c359 100644
--- a/app-editors/bvi/ChangeLog
+++ b/app-editors/bvi/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-editors/bvi
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/bvi/ChangeLog,v 1.18 2010/04/05 03:59:08 abcd Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/bvi/ChangeLog,v 1.19 2013/01/04 09:55:26 ryao Exp $
+
+*bvi-1.3.2-r1 (04 Jan 2013)
+
+ 04 Jan 2013; Richard Yao <ryao@gentoo.org> +bvi-1.3.2-r1.ebuild,
+ +files/bvi-1.3.2-fix-buffer-overflow.patch, bvi-1.3.2.ebuild, metadata.xml:
+ Take over maintainership and fix buffer overflow, bug #450064
05 Apr 2010; Jonathan Callen <abcd@gentoo.org> bvi-1.3.2.ebuild:
Bump to EAPI=3, add prefix keywords
diff --git a/app-editors/bvi/bvi-1.3.2-r1.ebuild b/app-editors/bvi/bvi-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..aad2d3ee5cc6
--- /dev/null
+++ b/app-editors/bvi/bvi-1.3.2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/bvi/bvi-1.3.2-r1.ebuild,v 1.1 2013/01/04 09:55:25 ryao Exp $
+
+EAPI=3
+
+inherit multilib eutils
+
+DESCRIPTION="display-oriented editor for binary files, based on the vi texteditor"
+HOMEPAGE="http://bvi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bvi/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+
+DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix-buffer-overflow.patch"
+ sed -i -e 's:(INSTALL_PROGRAM) -s:(INSTALL_PROGRAM):g' \
+ Makefile.in || die "sed failed in Makefile.in"
+
+ epatch_user
+}
+
+src_configure() {
+ econf --with-ncurses="${EPREFIX}"/usr
+
+ sed -i -e 's:ncurses/term.h:term.h:g' bmore.h || die "sed failed in bmore.h"
+}
+
+src_install() {
+ einstall || die "make install failed"
+ rm -rf "${ED}"/usr/$(get_libdir)/bmore.help
+ dodoc README CHANGES CREDITS bmore.help
+ dohtml -r html/*
+}
diff --git a/app-editors/bvi/bvi-1.3.2.ebuild b/app-editors/bvi/bvi-1.3.2.ebuild
index 679d2372f9ad..02ef97cd9022 100644
--- a/app-editors/bvi/bvi-1.3.2.ebuild
+++ b/app-editors/bvi/bvi-1.3.2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/bvi/bvi-1.3.2.ebuild,v 1.10 2010/04/05 03:59:08 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/bvi/bvi-1.3.2.ebuild,v 1.11 2013/01/04 09:55:25 ryao Exp $
EAPI=3
@@ -16,6 +16,7 @@ IUSE=""
KEYWORDS="amd64 ppc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}"
src_prepare() {
sed -i -e 's:(INSTALL_PROGRAM) -s:(INSTALL_PROGRAM):g' \
diff --git a/app-editors/bvi/files/bvi-1.3.2-fix-buffer-overflow.patch b/app-editors/bvi/files/bvi-1.3.2-fix-buffer-overflow.patch
new file mode 100644
index 000000000000..e3ebaa3d1295
--- /dev/null
+++ b/app-editors/bvi/files/bvi-1.3.2-fix-buffer-overflow.patch
@@ -0,0 +1,22 @@
+diff --git a/edit.c b/edit.c
+index 328a0cd..3cf6572 100644
+--- a/edit.c
++++ b/edit.c
+@@ -42,7 +42,7 @@ char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
+ "CAN", " EM", "SUB", "ESC", " FS", " GS", " RS", " US",
+ "DEL" };
+ char tmpbuf[10];
+-char linbuf[256];
++char linbuf[16384];
+
+ static char getcbuff[BUFFER];
+ static char *getcnext = NULL;
+@@ -492,7 +492,7 @@ printline(mempos, scpos)
+ *(string + print_pos) = '.';
+ }
+ *(string + Anzahl) = '\0';
+- strcat(linbuf, string);
++ strncat(linbuf, string, sizeof(linbuf) - strlen(linbuf) - 1);
+ mvaddstr(scpos, 0, linbuf);
+ }
+
diff --git a/app-editors/bvi/metadata.xml b/app-editors/bvi/metadata.xml
index f9d50da18d39..e63e3c3865da 100644
--- a/app-editors/bvi/metadata.xml
+++ b/app-editors/bvi/metadata.xml
@@ -2,7 +2,7 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
- <email>maintainer-needed@gentoo.org</email>
- <description>This package lacks a primary herd or maintainer.</description>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
</maintainer>
</pkgmetadata>