summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScore_Under <seejay.11@gmail.com>2018-07-28 04:08:40 +0100
committerHisham Muhammad <hisham@gobolinux.org>2018-08-24 16:01:25 -0300
commit7ec5312974fdd882e6840162dd904ad692067a92 (patch)
tree29ee3e119beeacc94d9a01c15554dc6b2e21b1b0
parentaf92f0b8d6d85c071d793730e825d956347e2630 (diff)
Fix process name updates for shorter strings (#812)
When a process name changes from a long string to a short string, truncate instead of just overwriting the beginning.
-rw-r--r--linux/LinuxProcessList.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 29ad4b7b..61501395 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -780,7 +780,7 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, const char* dirna
}
command[lastChar + 1] = '\0';
process->basenameOffset = tokenEnd;
- setCommand(process, command, lastChar);
+ setCommand(process, command, lastChar + 1);
return true;
}

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