From 0f649e2cd2eef94075f1975248953f8c5b85d9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20H=C3=A4kkinen?= Date: Sat, 6 Sep 2014 00:35:16 +0300 Subject: [PATCH] pgrep: avoid SEGV when lightweight and list-full options are used together do not segfault --- pgrep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {