diff options
-rw-r--r-- | tools/perf/util/event.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 2044324..2a6f33c 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -74,6 +74,7 @@ static pid_t perf_event__get_comm_tgid(pid_t pid, char *comm, size_t len) if (size >= len) size = len - 1; memcpy(comm, name, size); + comm[size] = '\0'; } else if (memcmp(bf, "Tgid:", 5) == 0) { char *tgids = bf + 5; |