Skip to content

Commit

Permalink
hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
Al Viro committed Aug 18, 2010
1 parent 9cb569d commit 850a496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 850a496

Please sign in to comment.