diff --git a/psmisc.changes b/psmisc.changes index e370da4..03dfc2e 100644 --- a/psmisc.changes +++ b/psmisc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 3 10:56:19 UTC 2011 - mmarek@suse.cz + +- Fix segfault in pstree, patch by Tetsuo Handa (bnc#718915). + ------------------------------------------------------------------- Wed Sep 28 10:43:03 UTC 2011 - coolo@suse.com diff --git a/psmisc.spec b/psmisc.spec index b26ef5d..8acbb58 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -33,6 +33,7 @@ Source: http://sourceforge.net/projects/psmisc/files/psmisc/%{name}-%{ve Patch0: %name-22.14.dif Patch1: %name-22.12-tigetstr.patch Patch2: %name-22.12-pstree.patch +Patch3: pstree-segfault.patch Patch42: %name-22.14-22.15.patch Patch43: %name-22.15-timeout.patch @@ -54,6 +55,7 @@ processes that are using specified files or filesystems. %patch1 -p0 -b .tigetstr %patch2 -p0 -b .pstree %patch0 -p0 -b .0 +%patch3 -p1 %build autoreconf -fi diff --git a/pstree-segfault.patch b/pstree-segfault.patch new file mode 100644 index 0000000..3604a27 --- /dev/null +++ b/pstree-segfault.patch @@ -0,0 +1,19 @@ +From: Tetsuo Handa + +See bnc#718915#c1 + +--- + src/pstree.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- psmisc-22.14.orig/src/pstree.c ++++ psmisc-22.14/src/pstree.c +@@ -70,7 +70,7 @@ extern const char *__progname; + #define VT_HD "w" + + typedef struct _proc { +- char comm[COMM_LEN + 1]; ++ char comm[COMM_LEN + 2 + 1]; /* add another 2 for thread brackets */ + char **argv; /* only used : argv[0] is 1st arg; undef if argc < 1 */ + int argc; /* with -a : number of arguments, -1 if swapped */ + pid_t pid;