diff options
author | Hisham <hisham@gobolinux.org> | 2016-02-13 02:18:28 -0200 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-02-13 02:18:28 -0200 |
commit | 0b70439316b4e4608c0916317ded7e6e56982de6 (patch) | |
tree | 801b37992cdceca89fde1ab55364105a651ef2f4 | |
parent | e9b32eb62f6505fd065022cdd085ae6d8e5e0e46 (diff) |
Fix buffer reuse.
-rw-r--r-- | linux/LinuxProcessList.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 591210e4..ec643abc 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -446,7 +446,7 @@ static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirn } static void setCommand(Process* process, const char* command, int len) { - if (process->comm && process->commLen <= len) { + if (process->comm && process->commLen >= len) { strncpy(process->comm, command, len + 1); } else { free(process->comm); |