From: Eero Häkkinen Date: Fri, 5 Sep 2014 21:35:16 +0000 (+0300) Subject: pgrep: avoid SEGV when lightweight and list-full options are used together X-Git-Tag: v3.3.11~82^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f649e2cd2eef94075f1975248953f8c5b85d9f4;p=procps-ng pgrep: avoid SEGV when lightweight and list-full options are used together do not segfault --- diff --git a/pgrep.c b/pgrep.c index 03767799..3ba36343 100644 --- a/pgrep.c +++ b/pgrep.c @@ -629,7 +629,7 @@ static struct el * select_procs (int *num) if (list == NULL) exit (EXIT_FATAL); } - if (opt_long) { + if (opt_long || opt_longlong) { list[matches].str = xstrdup (cmdoutput); list[matches++].num = subtask.XXXID; } else {