From 7ec5312974fdd882e6840162dd904ad692067a92 Mon Sep 17 00:00:00 2001 From: Score_Under Date: Sat, 28 Jul 2018 04:08:40 +0100 Subject: [PATCH] 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 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; }