[psmisc/f13/master] fix #642800 - peekfd SIGSEGV

Jan Görig jgorig at fedoraproject.org
Thu Oct 14 14:11:41 UTC 2010


commit 761451acd32ec44e0d6e766321e108aaa13a6cc5
Author: Jan Görig <jgorig at redhat.com>
Date:   Thu Oct 14 16:08:45 2010 +0200

    fix #642800 - peekfd SIGSEGV

 psmisc-22.6-peekfd-segv.patch |   12 ++++++++++++
 psmisc.spec                   |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/psmisc-22.6-peekfd-segv.patch b/psmisc-22.6-peekfd-segv.patch
new file mode 100644
index 0000000..610a63d
--- /dev/null
+++ b/psmisc-22.6-peekfd-segv.patch
@@ -0,0 +1,12 @@
+diff -up psmisc-22.6/src/peekfd.c.orig psmisc-22.6/src/peekfd.c
+--- psmisc-22.6/src/peekfd.c.orig	2007-11-04 06:50:17.000000000 +0100
++++ psmisc-22.6/src/peekfd.c	2010-10-14 16:05:46.019369001 +0200
+@@ -178,7 +178,7 @@ int main(int argc, char **argv)
+       numfds = argc - optind;
+       fds = malloc(sizeof(int) * numfds);
+ 	  for (i = 0; i < numfds; i++)
+-		fds[i] = atoi(argv[optind + 1 + i]);
++		fds[i] = atoi(argv[optind + i]);
+     }
+ 
+ 	attach(target_pid);
diff --git a/psmisc.spec b/psmisc.spec
index 1e90d0e..7764cc8 100644
--- a/psmisc.spec
+++ b/psmisc.spec
@@ -1,7 +1,7 @@
 Summary: Utilities for managing processes on your system
 Name: psmisc
 Version: 22.6
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -15,6 +15,8 @@ Patch1: psmisc-22.6-pstree-overflow.patch
 #fix #497303
 Patch2: psmisc-22.6-fuser-remove-mountlist.patch
 Patch3: psmisc-22.6-overflow2.patch
+#fix #642800
+Patch4: psmisc-22.6-peekfd-segv.patch
 
 BuildRequires: libselinux-devel
 BuildRequires: gettext
@@ -35,6 +37,7 @@ of processes that are using specified files or filesystems.
 %patch1 -p1 -b .overflow
 %patch2 -p1 -b .mount
 %patch3 -p1 -b .overflow2
+%patch4 -p1 -b .segv
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
@@ -75,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Wed Aug 05 2010 Jan Görig <jgorig at redhat.com> - 22.6-14
+- fix #642800 - peekfd SIGSEGV
+
 * Wed Aug 05 2009 Lubomir Rintel <lkundrak at v3.sk> - 22.6-13
 - Fix a buffer overflow
 


More information about the scm-commits mailing list