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
This commit is contained in:
parent
5f451cd59b
commit
6168020f66
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user