What | Removed | Added |
---|---|---|
Status | NEW | RESOLVED |
Resolution | --- | UPSTREAM |
(In reply to Thorsten Kukuk from comment #0) > Start a opensuse/tumbleweed:latest container > > Call "pgrep -P 1" > > With procps 3.3.13, you get a seg.fault. > procps 3.3.12 did worked fine. > > The problem is: opt_pattern is NULL, but in pgrep.c line 655, we use a > strlen without checking if opt_pattern is NULL, this leads to a crash. > > This blocks openSUSE Kubic, where we use pgrep in Containers. > > I think this change is broken: > "grep: warn about 15+ char name only if -f not used" This seems to be fixed with procps-ng-3.3.14 ... diff -up procps-ng-3.3.13 procps-ng-3.3.14/pgrep.c --- procps-ng-3.3.13/pgrep.c 2018-03-03 08:11:55.682869561 +0100 +++ procps-ng-3.3.14/pgrep.c 2018-04-10 13:14:00.917682291 +0200 [...] @@ -652,7 +652,7 @@ static struct el * select_procs (int *nu closeproc (ptp); *num = matches; - if ((!matches) && (!opt_full) && (strlen(opt_pattern) > 15)) + if ((!matches) && (!opt_full) && opt_pattern && (strlen(opt_pattern) > 15)) xwarnx(_("pattern that searches for process name longer than 15 characters will result in zero matches\n" "Try `%s -f' option to match against the complete command line."), program_invocation_short_name); now there is a SR#600279