Date: Sun, 27 Jan 2013 09:34:26 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245977 - head/sys/fs/nfsclient Message-ID: <201301270934.r0R9YQmG076058@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301270934.r0R9YQmG076058>