summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarendran Gopalakrishnan <g_narendran142@yahoo.com>2020-11-09 18:42:24 +0100
committerBenBE <BenBE@geshi.org>2020-11-24 19:05:48 +0100
commitdde2af1fdba9ce3b59b4f3386ec2c0664373cb94 (patch)
tree1dbfcba51125a746f3f88157f4936c0e374ec9c8
parente33d4d946086da38d7415f45dc954826864250b6 (diff)
Assume full basename matches COMM when matching full COMM buffer
-rw-r--r--linux/LinuxProcess.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index c9828065..cedc2162 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -240,8 +240,7 @@ static bool findCommInCmdline(const char *comm, const char *cmdline, int cmdline
}
tokenLen = token - tokenBase;
- if (((commLen < (TASK_COMM_LEN - 1) && tokenLen == commLen) ||
- (commLen == (TASK_COMM_LEN - 1) && tokenLen >= commLen)) &&
+ if ((tokenLen == commLen || (tokenLen > commLen && commLen == (TASK_COMM_LEN - 1))) &&
strncmp(tokenBase, comm, commLen) == 0) {
*pCommStart = tokenBase - cmdline;
*pCommEnd = token - cmdline;

© 2014-2024 Faster IT GmbH | imprint | privacy policy