psmisc/psmisc-22.7-pstree_overflow.patch
Stephan Kulow 22af05a3df Accepting request 42162 from home:jengelh:smp
Copy from home:jengelh:smp/psmisc via accept of submit request 42162 revision 2.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/42162
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=19
2010-06-28 21:24:20 +00:00

12 lines
339 B
Diff

--- src/pstree.c
+++ src/pstree.c
@@ -70,7 +70,7 @@
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;