0018-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 authored and Craig Small committed 2018-06-23 21:59:14 +10:00
1 parent 9d59bd6fc9
commit 55fac85bf0
1 file changed
+1 -1
+1 -1
View File
@@ -166,7 +166,7 @@ static void select_procs (void)
}
}
if (!is_omitted(tid) && p_cmdline) {
if (!is_omitted(tid) && p_cmdline && *p_cmdline) {
cmd_arg0 = *p_cmdline;