summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorScore_Under <seejay.11@gmail.com>2018-07-28 04:08:40 +0100
committerHisham Muhammad <hisham@gobolinux.org>2018-07-28 00:08:40 -0300
commitd74b6dc8e0f51b6b6fb2253bfcdbb86ea46774d7 (patch)
treef47b467378e8351aeb936f7666dea9bcb8777166 /linux
parent666e1e76b39ee66a38f5fb620d22b23f36859eca (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.
Diffstat (limited to 'linux')
-rw-r--r--linux/LinuxProcessList.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 2edd0425..27ead28a 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -709,7 +709,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