summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-14 17:36:23 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-14 17:36:23 +0000
commit5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0 (patch)
treef2e9cc4bd7f3c60c72fd8698a9064c10339dcb3c /dev-util
parentVersion bump. (diff)
downloadgentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.tar.gz
gentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.tar.bz2
gentoo-2-5c93728d0b555090fbe8ca6f9ac13bb2cdbb48e0.zip
Break out of infinite loop from corrupt getdents structs.
(Portage version: 2.1.4)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/strace/ChangeLog9
-rw-r--r--dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch26
-rw-r--r--dev-util/strace/strace-4.5.16-r1.ebuild5
3 files changed, 36 insertions, 4 deletions
diff --git a/dev-util/strace/ChangeLog b/dev-util/strace/ChangeLog
index f6a2dd5ed690..cdc67bf0e72a 100644
--- a/dev-util/strace/ChangeLog
+++ b/dev-util/strace/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/strace
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/ChangeLog,v 1.111 2007/12/26 16:12:56 armin76 Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/ChangeLog,v 1.112 2008/01/14 17:36:23 vapier Exp $
+
+ 14 Jan 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/strace-4.5.16-getdents-infinite-loop.patch,
+ strace-4.5.16-r1.ebuild:
+ Break out of infinite loop from corrupt getdents structs.
26 Dec 2007; Raúl Porcel <armin76@gentoo.org> strace-4.5.16-r1.ebuild:
sparc stable wrt #197398
diff --git a/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch b/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch
new file mode 100644
index 000000000000..20bdcdfcff23
--- /dev/null
+++ b/dev-util/strace/files/strace-4.5.16-getdents-infinite-loop.patch
@@ -0,0 +1,26 @@
+if the getdents struct is corrupt, strace will loop forever
+
+--- strace/file.c
++++ strace/file.c
+@@ -2414,6 +2414,10 @@ struct tcb *tcp;
+ #endif /* SUNOS4 */
+ i += d->d_reclen;
+ dents++;
++ if (!d->d_reclen) {
++ fprintf(stderr, "[error: d->d_reclen == 0] ");
++ break;
++ }
+ }
+ if (!abbrev(tcp))
+ tprintf("}");
+@@ -2466,6 +2470,10 @@ struct tcb * tcp;
+ }
+ i += d->d_reclen;
+ dents++;
++ if (!d->d_reclen) {
++ fprintf(stderr, "[error: d->d_reclen == 0] ");
++ break;
++ }
+ }
+ if (!abbrev(tcp))
+ tprintf("}");
diff --git a/dev-util/strace/strace-4.5.16-r1.ebuild b/dev-util/strace/strace-4.5.16-r1.ebuild
index deebf208de59..a253fb999590 100644
--- a/dev-util/strace/strace-4.5.16-r1.ebuild
+++ b/dev-util/strace/strace-4.5.16-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.5.16-r1.ebuild,v 1.4 2007/12/26 16:12:56 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.5.16-r1.ebuild,v 1.5 2008/01/14 17:36:23 vapier Exp $
inherit flag-o-matic autotools
@@ -27,6 +27,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-mips-syscallent.patch
epatch "${FILESDIR}"/${P}-sh-updates.patch
epatch "${FILESDIR}"/${P}-sparc-updates.patch #162789
+ epatch "${FILESDIR}"/${P}-getdents-infinite-loop.patch
eautoreconf
}