summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 00:59:34 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 00:59:34 -0500
commit725b2805fd5d729b0db59fe8fc992e97523782c7 (patch)
tree04ca7c7ed6e918029898a6c5301488e60d0564d4 /fs/9p/vfs_inode.c
parent9ac341ae799413708e674bc65c8a72c90dae8d34 (diff)
parentcac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff)
downloadblackbird-op-linux-725b2805fd5d729b0db59fe8fc992e97523782c7.tar.gz
blackbird-op-linux-725b2805fd5d729b0db59fe8fc992e97523782c7.zip
Merge branch 'upstream-fixes'
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 91f552454c76..63e5b0398e8b 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);
OpenPOWER on IntegriCloud