pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/py-psutil
Module Name: pkgsrc
Committed By: leot
Date: Fri Jun 7 19:09:06 UTC 2019
Modified Files:
pkgsrc/sysutils/py-psutil: Makefile distinfo
pkgsrc/sysutils/py-psutil/patches: patch-psutil_arch_netbsd_specific.c
Log Message:
py-psutil: Fix psutil.Popen.as_dict() MemoryError on NetBSD
Previously for kern.argmax a size_t was used in sysctl(3) and the
uninitialized data lead to a too big malloc() call that failed.
Bump PKGREVISION
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/sysutils/py-psutil/Makefile \
pkgsrc/sysutils/py-psutil/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/py-psutil/Makefile
diff -u pkgsrc/sysutils/py-psutil/Makefile:1.29 pkgsrc/sysutils/py-psutil/Makefile:1.30
--- pkgsrc/sysutils/py-psutil/Makefile:1.29 Sat Jun 1 01:11:57 2019
+++ pkgsrc/sysutils/py-psutil/Makefile Fri Jun 7 19:09:06 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.29 2019/06/01 01:11:57 kamil Exp $
+# $NetBSD: Makefile,v 1.30 2019/06/07 19:09:06 leot Exp $
DISTNAME= psutil-5.6.2
-PKGREVISION= 1
+PKGREVISION= 2
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= sysutils python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/psutil/}
Index: pkgsrc/sysutils/py-psutil/distinfo
diff -u pkgsrc/sysutils/py-psutil/distinfo:1.29 pkgsrc/sysutils/py-psutil/distinfo:1.30
--- pkgsrc/sysutils/py-psutil/distinfo:1.29 Sat Jun 1 01:11:57 2019
+++ pkgsrc/sysutils/py-psutil/distinfo Fri Jun 7 19:09:06 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29 2019/06/01 01:11:57 kamil Exp $
+$NetBSD: distinfo,v 1.30 2019/06/07 19:09:06 leot Exp $
SHA1 (psutil-5.6.2.tar.gz) = c01d48a103196eb513b72d32fbc7cee1ed64a38c
RMD160 (psutil-5.6.2.tar.gz) = 5450a028ad787d3e274a2c0e11c127bf5cd7e9da
@@ -6,5 +6,5 @@ SHA512 (psutil-5.6.2.tar.gz) = ff41428b4
Size (psutil-5.6.2.tar.gz) = 432907 bytes
SHA1 (patch-psutil___psbsd.py) = f8888b8f386a1928446c7d588a7a46f2674c69f6
SHA1 (patch-psutil___psutil__bsd.c) = 5516c6c257b389c7e977074d2a6eeb3c23f565d1
-SHA1 (patch-psutil_arch_netbsd_specific.c) = 3809727dcf605af44ec15f0ef5924acd65be5ea9
+SHA1 (patch-psutil_arch_netbsd_specific.c) = d43bc4d28212f75721df5a18287953d18a5673a4
SHA1 (patch-psutil_arch_netbsd_specific.h) = 4d6b3c96eefeec4908e1006b96ab175d64714dd2
Index: pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c
diff -u pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c:1.2 pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c:1.3
--- pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c:1.2 Sat Jun 1 01:11:57 2019
+++ pkgsrc/sysutils/py-psutil/patches/patch-psutil_arch_netbsd_specific.c Fri Jun 7 19:09:06 2019
@@ -1,9 +1,12 @@
-$NetBSD: patch-psutil_arch_netbsd_specific.c,v 1.2 2019/06/01 01:11:57 kamil Exp $
+$NetBSD: patch-psutil_arch_netbsd_specific.c,v 1.3 2019/06/07 19:09:06 leot Exp $
Don't include <sys/user.h> on NetBSD. Include <sys/iostat.h> instead.
Use proc_cwd on NetBSD >= 8.99.42.
+Use an `int' to store `kern.argmax' to avoid possible read of
+uninitialized memory.
+
--- psutil/arch/netbsd/specific.c.orig 2019-03-02 20:46:28.000000000 +0000
+++ psutil/arch/netbsd/specific.c
@@ -22,7 +22,7 @@
@@ -40,3 +43,31 @@ Use proc_cwd on NetBSD >= 8.99.42.
// XXX: This is no longer used as per
// https://github.com/giampaolo/psutil/pull/557#issuecomment-171912820
+@@ -313,8 +331,8 @@ psutil_get_proc_list(kinfo_proc **procLi
+ char *
+ psutil_get_cmd_args(pid_t pid, size_t *argsize) {
+ int mib[4];
++ int argmax;
+ ssize_t st;
+- size_t argmax;
+ size_t size;
+ char *procargs = NULL;
+
+@@ -339,14 +357,15 @@ psutil_get_cmd_args(pid_t pid, size_t *a
+ mib[2] = pid;
+ mib[3] = KERN_PROC_ARGV;
+
+- st = sysctl(mib, 4, procargs, &argmax, NULL, 0);
++ size = argmax;
++ st = sysctl(mib, 4, procargs, &size, NULL, 0);
+ if (st == -1) {
+ free(procargs);
+ PyErr_SetFromErrno(PyExc_OSError);
+ return NULL;
+ }
+
+- *argsize = argmax;
++ *argsize = size;
+ return procargs;
+ }
+
Home |
Main Index |
Thread Index |
Old Index