Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Fix process name updates for shorter strings (#812)
Browse files Browse the repository at this point in the history
When a process name changes from a long string to a short string,
truncate instead of just overwriting the beginning.
  • Loading branch information
ScoreUnder authored and hishamhm committed Jul 28, 2018
1 parent 666e1e7 commit d74b6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux/LinuxProcessList.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d74b6dc

Please sign in to comment.