From: David van Moolenbroek Date: Tue, 7 Aug 2012 11:08:26 +0000 (+0200) Subject: procfs: resolve Coverity warnings X-Git-Tag: v3.2.1~400 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=8c5d506b8aaac4ae1cbb02ca024a91bae5575d7e;p=minix.git procfs: resolve Coverity warnings --- diff --git a/servers/procfs/tree.c b/servers/procfs/tree.c index 26848e962..f4dfa49ce 100644 --- a/servers/procfs/tree.c +++ b/servers/procfs/tree.c @@ -411,14 +411,14 @@ static void pid_read(struct inode *node) /*===========================================================================* * pid_link * *===========================================================================*/ -static int pid_link(struct inode *UNUSED(node), char *ptr, int UNUSED(max)) +static int pid_link(struct inode *UNUSED(node), char *ptr, int max) { /* The contents of a symbolic link in a PID directory are requested. * This function is a placeholder for future use. */ /* Nothing yet. */ - strcpy(ptr, ""); + strlcpy(ptr, "", max); return OK; }