aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hostfs/hostfs_kern.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-03 16:38:52 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-03 16:38:52 -0400
commit68885a3ff38ed51fa02f241feb405c9922a90ee0 (patch)
tree2fc626df39d5e0e1f6b065238141f7d49187c737 /fs/hostfs/hostfs_kern.c
parent7b28079b3284ccb15ad4f003fb7073890600d0c1 (diff)
parenta2acad8298a42b7be684a32fafaf83332bba9c2b (diff)
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r--fs/hostfs/hostfs_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index dd1e55535a4e..f7dc9b5f9ef8 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;
@@ -876,7 +876,7 @@ static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd)
876 char *path = dentry_name(dentry); 876 char *path = dentry_name(dentry);
877 int err = -ENOMEM; 877 int err = -ENOMEM;
878 if (path) { 878 if (path) {
879 int err = hostfs_do_readlink(path, link, PATH_MAX); 879 err = hostfs_do_readlink(path, link, PATH_MAX);
880 if (err == PATH_MAX) 880 if (err == PATH_MAX)
881 err = -E2BIG; 881 err = -E2BIG;
882 __putname(path); 882 __putname(path);