From d74b6dc8e0f51b6b6fb2253bfcdbb86ea46774d7 Mon Sep 17 00:00:00 2001 From: Score_Under Date: Sat, 28 Jul 2018 04:08:40 +0100 Subject: 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. --- linux/LinuxProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3