diff options
author | Ed Swarthout <Ed.Swarthout@freescale.com> | 2009-11-19 02:47:28 -0600 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-12-07 21:50:19 +0100 |
commit | f64ef9bb995687e24e0b61b52316f4eaa97c3bbc (patch) | |
tree | 9cf845948f721b85dbb2dcd18292e7cb72c8aac4 /net/nfs.c | |
parent | e8fac25e83426fdf461c66aa8a2530ec28ec536e (diff) | |
download | u-boot-f64ef9bb995687e24e0b61b52316f4eaa97c3bbc.tar.gz |
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>
Diffstat (limited to 'net/nfs.c')
-rw-r--r-- | net/nfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |