commit powertop for openSUSE:Factory
Hello community, here is the log from the commit of package powertop for openSUSE:Factory checked in at Tue Feb 9 22:45:05 CET 2010. -------- --- powertop/powertop.changes 2009-03-04 00:45:06.000000000 +0100 +++ /mounts/work_src_done/STABLE/powertop/powertop.changes 2010-02-09 01:19:59.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Feb 9 01:18:56 CET 2010 - ro@suse.de + +- fix segfault: increase max lines from 5000 to 8000 for + /proc/config.gz and abort if reaching limit + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- powertop-segfault.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powertop.spec ++++++ --- /var/tmp/diff_new_pack.fAthSS/_old 2010-02-09 22:44:12.000000000 +0100 +++ /var/tmp/diff_new_pack.fAthSS/_new 2010-02-09 22:44:12.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package powertop (Version 1.11) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,10 +21,11 @@ Url: http://www.linuxpowertop.org Summary: PowerTOP is a Linux Tool to Find out What is Using Power on a Laptop Version: 1.11 -Release: 1 -License: GPL v2 or later +Release: 2 +License: GPLv2+ Group: System/Monitoring Source0: %{name}-%{version}.tar.gz +Patch0: powertop-segfault.diff BuildRequires: ncurses-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: on @@ -42,6 +43,7 @@ %prep %setup +%patch0 %build make CFLAGS="$RPM_OPT_FLAGS" ++++++ powertop-segfault.diff ++++++ --- config.c +++ config.c @@ -33,7 +33,7 @@ #include "powertop.h" /* static arrays are not nice programming.. but they're easy */ -static char configlines[5000][100]; +static char configlines[8000][100]; static int configcount; static void read_kernel_config(void) @@ -45,7 +45,7 @@ return; if (access("/proc/config.gz", R_OK) == 0) { file = popen("zcat /proc/config.gz 2> /dev/null", "r"); - while (file && !feof(file)) { + while (file && !feof(file) && configcount < 7999) { char line[100]; if (fgets(line, 100, file) == NULL) break; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de