diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-18 06:18:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-18 06:18:57 -0400 |
commit | 850a496f969719b494cc972ab1d0e088737358d7 (patch) | |
tree | 9892f09f246b8e855d0e89e58b649e0c5224bb20 /fs/hostfs | |
parent | 9cb569d601e0b93e01c20a22872270ec663b75f6 (diff) |
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hostfs')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index dd1e55535a4e..77c4f6ee6c40 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) | |||
104 | __putname(name); | 104 | __putname(name); |
105 | return NULL; | 105 | return NULL; |
106 | } | 106 | } |
107 | strncpy(name, root, PATH_MAX); | 107 | strlcpy(name, root, PATH_MAX); |
108 | if (len > p - name) { | 108 | if (len > p - name) { |
109 | __putname(name); | 109 | __putname(name); |
110 | return NULL; | 110 | return NULL; |