summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Bonazzola <sanchan@gentoo.org>2006-11-06 20:58:28 +0000
committerSandro Bonazzola <sanchan@gentoo.org>2006-11-06 20:58:28 +0000
commit1010b47088807faca079c8a21c6813a2788f05c3 (patch)
tree27985f926449a0910b7f121396619cbc097c46e3 /app-arch/rpm
parentdon't install gperf stuff (diff)
downloadhistorical-1010b47088807faca079c8a21c6813a2788f05c3.tar.gz
historical-1010b47088807faca079c8a21c6813a2788f05c3.tar.bz2
historical-1010b47088807faca079c8a21c6813a2788f05c3.zip
Security fix from upstream, patch from https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=139715. Should fix bug #154218.
Package-Manager: portage-2.1.2_rc1-r4
Diffstat (limited to 'app-arch/rpm')
-rw-r--r--app-arch/rpm/ChangeLog9
-rw-r--r--app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch95
-rw-r--r--app-arch/rpm/metadata.xml2
-rw-r--r--app-arch/rpm/rpm-4.4.6-r2.ebuild3
-rw-r--r--app-arch/rpm/rpm-4.4.7.ebuild3
5 files changed, 108 insertions, 4 deletions
diff --git a/app-arch/rpm/ChangeLog b/app-arch/rpm/ChangeLog
index 8cc2cef90034..8513633d5b48 100644
--- a/app-arch/rpm/ChangeLog
+++ b/app-arch/rpm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-arch/rpm
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.75 2006/10/26 10:10:34 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/ChangeLog,v 1.76 2006/11/06 20:58:28 sanchan Exp $
+
+ 06 Nov 2006; Sandro Bonazzola <sanchan@gentoo.org>
+ +files/rpm-4.4.6-buffer-overflow.patch, metadata.xml, rpm-4.4.6-r2.ebuild,
+ rpm-4.4.7.ebuild:
+ Security fix from upstream, patch from
+ https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=139715. Should fix
+ bug #154218.
26 Oct 2006; Peter Volkov <pva@gentoo.org> metadata.xml:
herd tag in metadata.xml is required. Returning it back.
diff --git a/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch b/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch
new file mode 100644
index 000000000000..d5439586388c
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.4.6-buffer-overflow.patch
@@ -0,0 +1,95 @@
+Index: lib/query.c
+===================================================================
+RCS file: /cvs/devel/rpm/lib/query.c,v
+retrieving revision 2.173.2.15
+retrieving revision 2.173.2.16
+diff -a -u -r2.173.2.15 -r2.173.2.16
+--- lib/query.c 8 Oct 2006 21:41:45 -0000 2.173.2.15
++++ lib/query.c 30 Oct 2006 02:50:53 -0000 2.173.2.16
+@@ -124,6 +124,28 @@
+ return str;
+ }
+
++/**
++ */
++static void flushBuffer(char ** tp, char ** tep, int nonewline)
++ /*@ modifies *tp, *tep @*/
++{
++ char *t, *te;
++
++ t = *tp;
++ te = *tep;
++ if (te > t) {
++ if (!nonewline) {
++ *te++ = '\n';
++ *te = '\0';
++ }
++ rpmMessage(RPMMESS_NORMAL, "%s", t);
++ te = t;
++ *t = '\0';
++ }
++ *tp = t;
++ *tep = te;
++}
++
+ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
+ {
+ int scareMem = 0;
+@@ -131,7 +153,6 @@
+ char * t, * te;
+ char * prefix = NULL;
+ int rc = 0; /* XXX FIXME: need real return code */
+- int nonewline = 0;
+ int i;
+
+ te = t = xmalloc(BUFSIZ);
+@@ -141,7 +162,6 @@
+
+ if (qva->qva_queryFormat != NULL) {
+ const char * str = queryHeader(h, qva->qva_queryFormat);
+- nonewline = 1;
+ /*@-branchstate@*/
+ if (str) {
+ size_t tb = (te - t);
+@@ -157,6 +177,7 @@
+ /*@=usereleased@*/
+ /*@=boundswrite@*/
+ str = _free(str);
++ flushBuffer(&t, &te, 1);
+ }
+ /*@=branchstate@*/
+ }
+@@ -312,31 +333,13 @@
+ _("package has neither file owner or id lists\n"));
+ }
+ }
+-/*@-branchstate@*/
+- if (te > t) {
+-/*@-boundswrite@*/
+- *te++ = '\n';
+- *te = '\0';
+- rpmMessage(RPMMESS_NORMAL, "%s", t);
+- te = t;
+- *t = '\0';
+-/*@=boundswrite@*/
+- }
+-/*@=branchstate@*/
++ flushBuffer(&t, &te, 0);
+ }
+
+ rc = 0;
+
+ exit:
+- if (te > t) {
+- if (!nonewline) {
+-/*@-boundswrite@*/
+- *te++ = '\n';
+- *te = '\0';
+-/*@=boundswrite@*/
+- }
+- rpmMessage(RPMMESS_NORMAL, "%s", t);
+- }
++ flushBuffer(&t, &te, 0);
+ t = _free(t);
+
+ fi = rpmfiFree(fi);
diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml
index f1fdf0e95c78..503cda1e94f5 100644
--- a/app-arch/rpm/metadata.xml
+++ b/app-arch/rpm/metadata.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd/>
+<herd>no-herd</herd>
<maintainer>
<email>sanchan@gentoo.org</email>
</maintainer>
diff --git a/app-arch/rpm/rpm-4.4.6-r2.ebuild b/app-arch/rpm/rpm-4.4.6-r2.ebuild
index f4d2aea3ecb0..980a5f2ddb10 100644
--- a/app-arch/rpm/rpm-4.4.6-r2.ebuild
+++ b/app-arch/rpm/rpm-4.4.6-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.6-r2.ebuild,v 1.4 2006/10/19 16:18:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.6-r2.ebuild,v 1.5 2006/11/06 20:58:28 sanchan Exp $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
@@ -38,6 +38,7 @@ src_unpack() {
epatch "${FILESDIR}"/rpm-4.4.6-with-sqlite.patch
epatch "${FILESDIR}"/rpm-4.4.6-stupidness.patch
epatch "${FILESDIR}"/rpm-4.4.6-autotools.patch
+ epatch "${FILESDIR}"/rpm-4.4.6-buffer-overflow.patch
# rpm uses AM_GNU_GETTEXT() but fails to actually
# include any of the required gettext files
diff --git a/app-arch/rpm/rpm-4.4.7.ebuild b/app-arch/rpm/rpm-4.4.7.ebuild
index 84e49a5a5e4a..ae84c433c907 100644
--- a/app-arch/rpm/rpm-4.4.7.ebuild
+++ b/app-arch/rpm/rpm-4.4.7.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.7.ebuild,v 1.4 2006/10/19 16:18:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/rpm/rpm-4.4.7.ebuild,v 1.5 2006/11/06 20:58:28 sanchan Exp $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
@@ -38,6 +38,7 @@ src_unpack() {
epatch "${FILESDIR}"/rpm-4.4.6-with-sqlite.patch
epatch "${FILESDIR}"/rpm-4.4.7-stupidness.patch
epatch "${FILESDIR}"/rpm-4.4.6-autotools.patch
+ epatch "${FILESDIR}"/rpm-4.4.6-buffer-overflow.patch
# rpm uses AM_GNU_GETTEXT() but fails to actually
# include any of the required gettext files