From 63a033a6509e9349baf17d0d64d3c3f31c9a75c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20G=C3=B6rig?= Date: Thu, 14 Oct 2010 15:51:33 +0200 Subject: [PATCH] fix #642800 - peekfd regression --- psmisc-22.13-peekfd-segv.patch | 13 +++++++++++++ psmisc.spec | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 psmisc-22.13-peekfd-segv.patch diff --git a/psmisc-22.13-peekfd-segv.patch b/psmisc-22.13-peekfd-segv.patch new file mode 100644 index 0000000..c3b03d5 --- /dev/null +++ b/psmisc-22.13-peekfd-segv.patch @@ -0,0 +1,13 @@ +diff --git a/src/peekfd.c b/src/peekfd.c +index 2c30f25..6d759b9 100644 +--- a/src/peekfd.c ++++ b/src/peekfd.c +@@ -199,7 +199,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 + i + 1]); ++ fds[i] = atoi(argv[optind + i]); + } + + attach(target_pid); diff --git a/psmisc.spec b/psmisc.spec index 239c09b..aaecc11 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing processes on your system Name: psmisc Version: 22.13 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -13,6 +13,8 @@ BuildRequires: gettext BuildRequires: ncurses-devel BuildRequires: autoconf automake +Patch1: psmisc-22.13-peekfd-segv.patch + %description The psmisc package contains utilities for managing processes on your system: pstree, killall and fuser. The pstree command displays a tree @@ -24,6 +26,8 @@ of processes that are using specified files or filesystems. %prep %setup -q +%patch1 -p1 + %build %configure --prefix=%{_prefix} --enable-selinux make %{?_smp_mflags} @@ -55,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS ChangeLog COPYING README %changelog +* Thu Oct 14 2010 Jan Görig 22.13-3 +- fix #642800 - peekfd regression + * Wed Sep 29 2010 jkeating - 22.13-2 - Rebuilt for gcc bug 634757