diff --git a/SOURCES/psmisc-22.20-pstree-consecutive-NULs.patch b/SOURCES/psmisc-22.20-pstree-consecutive-NULs.patch new file mode 100644 index 0000000..23c189b --- /dev/null +++ b/SOURCES/psmisc-22.20-pstree-consecutive-NULs.patch @@ -0,0 +1,17 @@ +diff -up ./src/pstree.c.ori ./src/pstree.c +--- ./src/pstree.c.ori 2020-05-12 16:19:07.517885359 +0200 ++++ ./src/pstree.c 2020-05-12 16:19:35.753226398 +0200 +@@ -469,8 +469,12 @@ static void set_args(PROC * this, const + } + this->argc = 0; + for (i = 0; i < size - 1; i++) +- if (!args[i]) ++ if (!args[i]) { + this->argc++; ++ /* now skip consecutive NUL */ ++ while(!args[i] && (i < size -1 )) ++ i++; ++ } + if (!this->argc) + return; + if (!(this->argv = malloc(sizeof(char *) * this->argc))) { diff --git a/SPECS/psmisc.spec b/SPECS/psmisc.spec index 1b8b21b..a04bfbe 100644 --- a/SPECS/psmisc.spec +++ b/SPECS/psmisc.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing processes on your system Name: psmisc Version: 22.20 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2+ Group: Applications/System URL: http://sourceforge.net/projects/psmisc @@ -25,6 +25,7 @@ Patch9: psmisc-22.20-fuser-finds-btrfs-procs.patch Patch10: psmisc-22.20-fuser-manpage-other-pids-restrict.patch Patch11: psmisc-22.20-peekfd-usage-extend-and-fix.patch Patch12: psmisc-22-20-no-nullptr-sanity-stalls-nfs.patch +Patch13: psmisc-22.20-pstree-consecutive-NULs.patch BuildRequires: libselinux-devel BuildRequires: gettext @@ -54,6 +55,7 @@ of processes that are using specified files or filesystems. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build %configure --prefix=%{_prefix} --enable-selinux @@ -86,6 +88,10 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_sbindir} %doc AUTHORS ChangeLog COPYING README %changelog +* Tue May 12 2020 Jan Rybar 22.20-17 +- pstree - fixed consecutive NULs breaking tree +- Resolves: rhbz#1715510 + * Mon Mar 18 2019 Jan Rybar 22.20-16 - Added nullptr sanity to scan fns to avoid useless work stalling NFS - Resolves: rhbz#1509245