From f64ef9bb995687e24e0b61b52316f4eaa97c3bbc Mon Sep 17 00:00:00 2001 From: Ed Swarthout Date: Thu, 19 Nov 2009 02:47:28 -0600 Subject: fix nfs symlink name corruption An off by one error may cause nfs readlink lookup fail if nfs_path_buff has non-zero data from a previous use. Loading: *** ERROR: File lookup fail Signed-off-by: Ed Swarthout --- net/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/nfs.c') diff --git a/net/nfs.c b/net/nfs.c index 27395fbf2e..c39f616d9b 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -516,7 +516,7 @@ nfs_readlink_reply (uchar *pkt, unsigned len) strcat (nfs_path, "/"); pathlen = strlen(nfs_path); memcpy (nfs_path+pathlen, (uchar *)&(rpc_pkt.u.reply.data[2]), rlen); - nfs_path[pathlen+rlen+1] = 0; + nfs_path[pathlen + rlen] = 0; } else { memcpy (nfs_path, (uchar *)&(rpc_pkt.u.reply.data[2]), rlen); nfs_path[rlen] = 0; -- cgit