aboutsummaryrefslogtreecommitdiff
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-02-24 09:06:36 +0000
committerAnton Altaparmakov <aia21@cantab.net>2006-02-24 09:06:36 +0000
commitfab8d6ddf6dee2608869005d45fe97f70e4f5bdd (patch)
treefecf566e03a87b2a44c7f3363ddb5c0d4bebdca7 /fs/9p/vfs_inode.c
parent64419d93a5906600af5817ad0cae3c6ecf7fb389 (diff)
parentf52ee1410d563cd409b08822492273a5bc235821 (diff)
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 91f552454c7..63e5b0398e8 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -886,8 +886,8 @@ static int v9fs_readlink(struct dentry *dentry, char *buffer, int buflen)
}
/* copy extension buffer into buffer */
- if (fcall->params.rstat.stat.extension.len < buflen)
- buflen = fcall->params.rstat.stat.extension.len;
+ if (fcall->params.rstat.stat.extension.len+1 < buflen)
+ buflen = fcall->params.rstat.stat.extension.len + 1;
memcpy(buffer, fcall->params.rstat.stat.extension.str, buflen - 1);
buffer[buflen-1] = 0;
@@ -951,7 +951,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd)
if (!link)
link = ERR_PTR(-ENOMEM);
else {
- len = v9fs_readlink(dentry, link, strlen(link));
+ len = v9fs_readlink(dentry, link, PATH_MAX);
if (len < 0) {
__putname(link);