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 <Ed.Swarthout@freescale.com>
This commit is contained in:
Ed Swarthout 2009-11-19 02:47:28 -06:00 committed by Wolfgang Denk
parent e8fac25e83
commit f64ef9bb99
1 changed files with 1 additions and 1 deletions

View File

@ -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;