hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy
Al Viro [Wed, 18 Aug 2010 10:18:57 +0000 (06:18 -0400)]
... not harmless in this case - we have a string in the end of buffer
already.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

fs/hostfs/hostfs_kern.c

index dd1e555..77c4f6e 100644 (file)
@@ -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;