[psmisc] fix #666213 - uninitialized memory leading to `killall -g name` failure

Jan Görig jgorig at fedoraproject.org
Fri Jan 7 14:36:24 UTC 2011


commit 055dabaf4f9470cd896c0a8535579e792eb27100
Author: Jan Görig <jgorig at redhat.com>
Date:   Fri Jan 7 15:35:23 2011 +0100

    fix #666213 - uninitialized memory leading to `killall -g name` failure

 psmisc-22.13-killall-pgid.patch |   13 +++++++++++++
 psmisc.spec                     |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/psmisc-22.13-killall-pgid.patch b/psmisc-22.13-killall-pgid.patch
new file mode 100644
index 0000000..28f483b
--- /dev/null
+++ b/psmisc-22.13-killall-pgid.patch
@@ -0,0 +1,13 @@
+diff --git a/src/killall.c b/src/killall.c
+index 8b590c2..2550fc1 100644
+--- a/src/killall.c
++++ b/src/killall.c
+@@ -331,7 +331,7 @@ kill_all (int signal, int names, char **namelist, struct passwd *pwent)
+     pgids = NULL;		/* silence gcc */
+   else
+     {
+-      pgids = malloc (pids * sizeof (pid_t));
++      pgids = calloc (pids, sizeof (pid_t));
+       if (!pgids)
+ 	{
+ 	  perror ("malloc");
diff --git a/psmisc.spec b/psmisc.spec
index fae4590..335fbb3 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: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -15,6 +15,7 @@ BuildRequires: autoconf automake
 
 Patch1: psmisc-22.13-peekfd-segv.patch
 Patch2: psmisc-22.13-fuser-silent.patch
+Patch3: psmisc-22.13-killall-pgid.patch
 
 %description
 The psmisc package contains utilities for managing processes on your
@@ -29,6 +30,7 @@ of processes that are using specified files or filesystems.
 
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %configure --prefix=%{_prefix} --enable-selinux
@@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS ChangeLog COPYING README
 
 %changelog
+* Fri Jan 7 2011 Jan Görig <jgorig at redhat.com> 22.13-6
+- fix #666213 - uninitialized memory leading to `killall -g name` failure
+
 * Tue Nov 16 2010 Jan Görig <jgorig at redhat.com> 22.13-5
 - fix #651794 - incorrect exit code of fuser -m -s
 


More information about the scm-commits mailing list