diff options
author | Dawid Węgliński <cla@gentoo.org> | 2010-01-20 17:04:04 +0000 |
---|---|---|
committer | Dawid Węgliński <cla@gentoo.org> | 2010-01-20 17:04:04 +0000 |
commit | fa62fe59a8f4aa22828f7f64abd30b21054cace4 (patch) | |
tree | b8bf847181561afc9c0e9087c93a745cc799d0d8 /app-admin/procinfo | |
parent | This new revision fixes #301594, an issue with the vlan support (diff) | |
download | gentoo-2-fa62fe59a8f4aa22828f7f64abd30b21054cace4.tar.gz gentoo-2-fa62fe59a8f4aa22828f7f64abd30b21054cace4.tar.bz2 gentoo-2-fa62fe59a8f4aa22828f7f64abd30b21054cace4.zip |
Don't segfault when /proc/stat exceeds 1024 characters (bug #300611)
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/procinfo')
-rw-r--r-- | app-admin/procinfo/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/procinfo/files/procinfo-18-stat.patch | 21 | ||||
-rw-r--r-- | app-admin/procinfo/procinfo-18-r1.ebuild | 5 |
3 files changed, 30 insertions, 4 deletions
diff --git a/app-admin/procinfo/ChangeLog b/app-admin/procinfo/ChangeLog index 783eeab5cbe0..803e8b5e3044 100644 --- a/app-admin/procinfo/ChangeLog +++ b/app-admin/procinfo/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-admin/procinfo -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/procinfo/ChangeLog,v 1.22 2008/05/20 11:47:41 armin76 Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/procinfo/ChangeLog,v 1.23 2010/01/20 17:04:03 cla Exp $ + + 20 Jan 2010; Dawid Węgliński <cla@gentoo.org> procinfo-18-r1.ebuild, + +files/procinfo-18-stat.patch: + Don't segfault when /proc/stat exceeds 1024 characters (bug #300611) 20 May 2008; Raúl Porcel <armin76@gentoo.org> procinfo-18-r1.ebuild: Add ~ia64 diff --git a/app-admin/procinfo/files/procinfo-18-stat.patch b/app-admin/procinfo/files/procinfo-18-stat.patch new file mode 100644 index 000000000000..d7dc4a458b28 --- /dev/null +++ b/app-admin/procinfo/files/procinfo-18-stat.patch @@ -0,0 +1,21 @@ +diff -ur procinfo-18/procinfo.c procinfo-18-mod/procinfo.c +--- procinfo-18/procinfo.c 2001-02-25 11:29:16.000000000 +0000 ++++ procinfo-18-mod/procinfo.c 2008-04-16 10:16:29.000000000 +0100 +@@ -76,7 +76,7 @@ + *devicesfp, *filesystemsfp, *interruptsfp, *dmafp, *cmdlinefp, + *versionfp, *cpuinfofp; + +-char line[1024], cmdline[1024], booted[40], *version = NULL, *message = NULL; ++char line[4096], cmdline[1024], booted[40], *version = NULL, *message = NULL; + + float rate = 1.0; /* per interval or per sec */ + +@@ -446,7 +446,7 @@ + */ + char *q; + +- if ((q = strstr (p, "PIC"))) { ++ if ((q = strstr (p, "PIC")) || (q = strstr (p, "MSI"))) { + while (*q != ' ') /* eat up "PIC" or "PIC-foo" */ + q++; + while (*q == ' ') /* eat up spaces */ diff --git a/app-admin/procinfo/procinfo-18-r1.ebuild b/app-admin/procinfo/procinfo-18-r1.ebuild index 78bcafe20f23..287303e59fc3 100644 --- a/app-admin/procinfo/procinfo-18-r1.ebuild +++ b/app-admin/procinfo/procinfo-18-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/procinfo/procinfo-18-r1.ebuild,v 1.11 2008/05/20 11:47:41 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/procinfo/procinfo-18-r1.ebuild,v 1.12 2010/01/20 17:04:03 cla Exp $ inherit eutils toolchain-funcs @@ -18,6 +18,7 @@ src_unpack() { epatch "${FILESDIR}"/kernel-2.6.patch epatch "${FILESDIR}"/cpu-usage-fix.patch epatch "${FILESDIR}"/${PN}-flags.patch + epatch "${FILESDIR}"/${P}-stat.patch } src_compile() { |