diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2006-02-24 09:06:36 +0000 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2006-02-24 09:06:36 +0000 |
commit | fab8d6ddf6dee2608869005d45fe97f70e4f5bdd (patch) | |
tree | fecf566e03a87b2a44c7f3363ddb5c0d4bebdca7 /fs/9p/vfs_inode.c | |
parent | 64419d93a5906600af5817ad0cae3c6ecf7fb389 (diff) | |
parent | f52ee1410d563cd409b08822492273a5bc235821 (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.c | 6 |
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); |