Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-03-14 23:39:08 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-03-14 23:39:08 -0800
commit93bf18c70ba9d6ca8c85d4ced4cdc8974b66dcd7 (patch)
tree3f9eff17fcce0ff168adbffcf01400154d5ec5ae
parent2b68239ff70ab5ff848181db88a967b67f744e25 (diff)
[PATCH] use strncpy in get_task_comm
From: Prasanna Meda <pmeda@akamai.com> Set_task_comm uses strlcpy, so get_task_comm must use strncpy. Signed-Off-by: Prasanna Meda <pmeda@akamai.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index ee58e91a9d7f..b76cdcc74a87 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -814,7 +814,7 @@ void get_task_comm(char *buf, struct task_struct *tsk)
{
/* buf must be at least sizeof(tsk->comm) in size */
task_lock(tsk);
- memcpy(buf, tsk->comm, sizeof(tsk->comm));
+ strncpy(buf, tsk->comm, sizeof(tsk->comm));
task_unlock(tsk);
}