lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] v9fs-replace-strlen-with-pathmax-getname.patch
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>

strlen errorneously called with newly allocated by __getname buffer

---
commit 0b381cf7efcd34bb6b316baf7ed5d18d402e62f0
tree c8ec5ac42ec5d1c28d2f97a1de553940f3746f2b
parent 34ad50ad5bf63c55687350d9f4e3c4dcc44304a7
author Latchesar Ionkov <lucho@ionkov.net> Tue, 20 Sep 2005 19:28:30 -0400
committer Latchesar Ionkov <lucho@ionkov.net> Tue, 20 Sep 2005 19:28:30 -0400

fs/9p/vfs_inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1063,8 +1063,8 @@ static int v9fs_vfs_readlink(struct dent
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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-09-21 03:26    [W:0.019 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site