From 055dabaf4f9470cd896c0a8535579e792eb27100 Mon Sep 17 00:00:00 2001 From: Jan Görig Date: Jan 07 2011 14:35:23 +0000 Subject: fix #666213 - uninitialized memory leading to `killall -g name` failure --- 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 22.13-6 +- fix #666213 - uninitialized memory leading to `killall -g name` failure + * Tue Nov 16 2010 Jan Görig 22.13-5 - fix #651794 - incorrect exit code of fuser -m -s