projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] v9fs: replace strlen on newly allocated by __getname buffers to PATH_MAX
[powerpc.git]
/
fs
/
9p
/
vfs_inode.c
diff --git
a/fs/9p/vfs_inode.c
b/fs/9p/vfs_inode.c
index
0c13fc6
..
b16322d
100644
(file)
--- a/
fs/9p/vfs_inode.c
+++ b/
fs/9p/vfs_inode.c
@@
-1063,8
+1063,8
@@
static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer,
int ret;
char *link = __getname();
- if (
strlen(link) < buflen
)
- buflen =
strlen(link)
;
+ if (
buflen > PATH_MAX
)
+ buflen =
PATH_MAX
;
dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);