[SCM] Debian packaging of libproc-processtable-perl branch, master, updated. debian/0.45-5-9-g302f5f6
Salvatore Bonaccorso
carnil at debian.org
Wed Jan 16 06:37:50 UTC 2013
The following commit has been merged in the master branch:
commit f1c70f00301ba335586f6fd50a6b3cd423d04a8b
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Tue Jan 15 16:01:05 2013 +0100
Refresh 696874-fix-Buffer-overflow-in-pctcpu.patch
Update buffer to work with up to 9999 logical CPUs. See #696874.
diff --git a/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch b/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch
index d0ad624..734e668 100644
--- a/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch
+++ b/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch
@@ -1,7 +1,7 @@
Description: Fix for buffer overflow in pctcpu
On systems with more than 9 logical CPUs, a process can use more than 999% of
CPU and overflow pctcpu. This patch increases the buffer so that it will work
- for up to 99 logical CPUs.
+ for up to 9999 logical CPUs.
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=82175
Bug-Debian: http://bugs.debian.org/696874
Bug-Ubuntu: https://launchpad.net/bugs/1093289
@@ -17,7 +17,7 @@ Last-Update: 2012-12-23
char *exec;
/* other values */
- char pctcpu[sizeof("100.00")]; /* precent cpu, without '%' char */
-+ char pctcpu[sizeof("1000.00")]; /* precent cpu, without '%' char */
++ char pctcpu[sizeof("100000.00")]; /* precent cpu, without '%' char */
char pctmem[sizeof("100.00")]; /* precent memory, without '%' char */
};
@@ -28,7 +28,7 @@ Last-Update: 2012-12-23
/* calculate pctcpu - NOTE: This assumes the cpu time is in microsecond units! */
- sprintf(prs->pctcpu, "%3.2f", pctcpu);
-+ sprintf(prs->pctcpu, "%4.2f", pctcpu);
++ sprintf(prs->pctcpu, "%6.2f", pctcpu);
field_enable(format_str, F_PCTCPU);
/* calculate pctmem */
--
Debian packaging of libproc-processtable-perl
More information about the Pkg-perl-cvs-commits
mailing list