svn commit: r245977 - head/sys/fs/nfsclient

Konstantin Belousov kib at FreeBSD.org
Sun Jan 27 09:34:26 UTC 2013


Author: kib
Date: Sun Jan 27 09:34:25 2013
New Revision: 245977
URL: http://svnweb.freebsd.org/changeset/base/245977

Log:
  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

Modified:
  head/sys/fs/nfsclient/nfs_clrpcops.c

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c	Sun Jan 27 09:31:11 2013	(r245976)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c	Sun Jan 27 09:34:25 2013	(r245977)
@@ -1444,7 +1444,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u
 			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;


More information about the svn-src-all mailing list