summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-01-27 09:34:25 +0000
committerkib <kib@FreeBSD.org>2013-01-27 09:34:25 +0000
commitd622325e53fd0213024c18d33b160e10e75c67db (patch)
tree1ec7c8df1178167eaa05ff0ce94842e88dcbcf05
parentf4c4064ce883a321c46b934e0a3378d8a446df06 (diff)
downloadFreeBSD-src-d622325e53fd0213024c18d33b160e10e75c67db.zip
FreeBSD-src-d622325e53fd0213024c18d33b160e10e75c67db.tar.gz
Be conservative and do not try to consume more bytes than was
requested from the server for the read operation. Server shall not reply with too large size, but client should be resilent too. Reviewed by: rmacklem MFC after: 1 week
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index be0476a..a89b907 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -1444,7 +1444,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *uiop, struct ucred *cred,
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
eof = fxdr_unsigned(int, *tl);
}
- NFSM_STRSIZ(retlen, rsize);
+ NFSM_STRSIZ(retlen, len);
error = nfsm_mbufuio(nd, uiop, retlen);
if (error)
goto nfsmout;
OpenPOWER on IntegriCloud