Message ID | 1459382094-8517-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 1447ec0..c2e2bad 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -171,7 +171,7 @@ static u64 bpf_get_current_comm(u64 r1, u64 size, u64 r3, u64 r4, u64 r5) if (!task) return -EINVAL; - memcpy(buf, task->comm, min_t(size_t, size, sizeof(task->comm))); + strlcpy(buf, task->comm, min_t(size_t, size, sizeof(task->comm))); return 0; }