[SCM] Debian packaging of libproc-processtable-perl branch, master, updated. debian/0.45-3-8-g3c3968b

Salvatore Bonaccorso carnil at debian.org
Fri Dec 28 18:03:17 UTC 2012


The following commit has been merged in the master branch:
commit 0625d60d0b43ff198425d99b1d6d28d81b99c33f
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Fri Dec 28 17:21:16 2012 +0100

    Add 696874-fix-Buffer-overflow-in-pctcpu.patch
    
    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.
    
    Thanks:  Matthew L. Dailey and Zhengpeng Hou
    
    Closes: #696874
    LP: #1093289

diff --git a/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch b/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch
new file mode 100644
index 0000000..d0ad624
--- /dev/null
+++ b/debian/patches/696874-fix-Buffer-overflow-in-pctcpu.patch
@@ -0,0 +1,34 @@
+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.
+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
+Forwarded: not-needed
+Author: Matthew L. Dailey <matthew.l.dailey at dartmouth.edu>
+Reviewed-by: Salvatore Bonaccorso <carnil at debian.org>
+Last-Update: 2012-12-23
+
+--- libproc-processtable-perl-0.45.orig/os/Linux.h
++++ libproc-processtable-perl-0.45/os/Linux.h
+@@ -42,7 +42,7 @@ struct procstat
+ 	char			*cmndline;
+ 	char			*exec;
+ 	/* other values */
+-	char			pctcpu[sizeof("100.00")];	/* precent cpu, without '%' char */
++	char			pctcpu[sizeof("1000.00")];	/* precent cpu, without '%' char */
+ 	char			pctmem[sizeof("100.00")];	/* precent memory, without '%' char */
+ };
+ 
+--- libproc-processtable-perl-0.45.orig/os/Linux.c
++++ libproc-processtable-perl-0.45/os/Linux.c
+@@ -551,7 +551,7 @@ static void calc_prec(char *format_str,
+     float pctcpu = 100.0f * (prs->utime / 1e6) / (time(NULL) - prs->start_time);
+ 
+     /* calculate pctcpu - NOTE: This assumes the cpu time is in microsecond units! */
+-    sprintf(prs->pctcpu, "%3.2f", pctcpu);
++    sprintf(prs->pctcpu, "%4.2f", pctcpu);
+     field_enable(format_str, F_PCTCPU);
+ 
+     /* calculate pctmem */
diff --git a/debian/patches/series b/debian/patches/series
index 99b7642..2e86906 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 spelling.patch
 646785-add-new-states.patch
+696874-fix-Buffer-overflow-in-pctcpu.patch

-- 
Debian packaging of libproc-processtable-perl



More information about the Pkg-perl-cvs-commits mailing list