summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-13 02:18:28 -0200
committerHisham <hisham@gobolinux.org>2016-02-13 02:18:28 -0200
commit0b70439316b4e4608c0916317ded7e6e56982de6 (patch)
tree801b37992cdceca89fde1ab55364105a651ef2f4 /linux
parente9b32eb62f6505fd065022cdd085ae6d8e5e0e46 (diff)
Fix buffer reuse.
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 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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy