From: Al Viro Date: Wed, 18 Aug 2010 10:18:57 +0000 (-0400) Subject: hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy X-Git-Tag: v2.6.36-rc2~38^2~12 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=850a496f969719b494cc972ab1d0e088737358d7;p=unionfs-2.6.39.y.git hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy ... not harmless in this case - we have a string in the end of buffer already. Signed-off-by: Al Viro --- diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index dd1e55535a4..77c4f6ee6c4 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -104,7 +104,7 @@ static char *__dentry_name(struct dentry *dentry, char *name) __putname(name); return NULL; } - strncpy(name, root, PATH_MAX); + strlcpy(name, root, PATH_MAX); if (len > p - name) { __putname(name); return NULL;