pidof: Do not skip the NULL terminator in cmdline.

This should never happen (cmdline[0] should always be non-NULL), but
just in case.
This commit is contained in:
Qualys Security Advisory 1970-01-01 00:00:00 +00:00 committed by Craig Small
parent 6cadda2b4f
commit bba9f384c0

View File

@ -161,7 +161,7 @@ static void select_procs (void)
}
}
if (!is_omitted(task.XXXID) && task.cmdline) {
if (!is_omitted(task.XXXID) && task.cmdline && *task.cmdline) {
cmd_arg0 = *task.cmdline;