diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2008-11-28 15:33:31 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2008-11-28 15:33:31 +0800 |
commit | ceae8acad091ed8b76d8e828715cc77c02f3cfd8 (patch) | |
tree | e7151752a756bc1dc3fb01788609654eb8abeabb | |
parent | 5f6afcfa43b6ec6ddf273d4bec8c2a3680c46fce (diff) | |
download | marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar.gz marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar.bz2 marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar.lz marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar.xz marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.tar.zst marcuscom-ports-ceae8acad091ed8b76d8e828715cc77c02f3cfd8.zip |
Check the kf_structsize member to make sure we've correctly read the data
from the kernel.
Reported by: peter
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@11803 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | devel/libgtop/Makefile | 4 | ||||
-rw-r--r-- | devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c | 12 | ||||
-rw-r--r-- | devel/libgtop/files/patch-sysdeps_freebsd_procwd.c | 12 |
3 files changed, 26 insertions, 2 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile index 222aa9ccb..1bc7398b8 100644 --- a/devel/libgtop/Makefile +++ b/devel/libgtop/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/libgtop/Makefile,v 1.41 2008/09/29 17:52:59 marcus Exp $ +# $MCom: ports/devel/libgtop/Makefile,v 1.42 2008/09/29 21:30:59 marcus Exp $ # PORTNAME= libgtop PORTVERSION= 2.24.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c b/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c new file mode 100644 index 000000000..1593c0f16 --- /dev/null +++ b/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c @@ -0,0 +1,12 @@ +--- sysdeps/freebsd/procopenfiles.c.orig 2008-11-28 02:24:59.000000000 -0500 ++++ sysdeps/freebsd/procopenfiles.c 2008-11-28 02:26:12.000000000 -0500 +@@ -293,6 +293,9 @@ glibtop_get_proc_open_files_s (glibtop * + for (i = 0; i < len / sizeof(*kif); i++, kif++) { + glibtop_open_files_entry entry = {0}; + ++ if (kif->kf_structsize != sizeof(*kif)) ++ continue; ++ + if (kif->kf_fd < 0) + continue; + diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c b/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c new file mode 100644 index 000000000..ac685c0ca --- /dev/null +++ b/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c @@ -0,0 +1,12 @@ +--- sysdeps/freebsd/procwd.c.orig 2008-11-28 02:26:20.000000000 -0500 ++++ sysdeps/freebsd/procwd.c 2008-11-28 02:26:51.000000000 -0500 +@@ -131,6 +131,9 @@ glibtop_get_proc_wd_s(glibtop *server, g + dirs = g_ptr_array_sized_new(1); + + for (i = 0; i < len / sizeof(*kif); i++, kif++) { ++ if (kif->kf_structsize != sizeof(*kif)) ++ continue; ++ + switch (kif->kf_fd) { + case KF_FD_TYPE_ROOT: + g_strlcpy(buf->root, kif->kf_path, |