Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75394
b: refs/heads/master
c: ba67a39
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jan 13, 2008
1 parent a82d3d8 commit aadc197
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84427eaef1fb91704c7112bdb598c810003b99f3
refs/heads/master: ba67a39efde8312e386c6f603054f8945433d91f
5 changes: 4 additions & 1 deletion trunk/fs/nfsd/nfs3xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,11 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
* Round the length of the data which was specified up to
* the next multiple of XDR units and then compare that
* against the length which was actually received.
* Note that when RPCSEC/GSS (for example) is used, the
* data buffer can be padded so dlen might be larger
* than required. It must never be smaller.
*/
if (dlen != XDR_QUADLEN(len)*4)
if (dlen < XDR_QUADLEN(len)*4)
return 0;

if (args->count > max_blocksize) {
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/nfsd/nfsxdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
* Round the length of the data which was specified up to
* the next multiple of XDR units and then compare that
* against the length which was actually received.
* Note that when RPCSEC/GSS (for example) is used, the
* data buffer can be padded so dlen might be larger
* than required. It must never be smaller.
*/
if (dlen != XDR_QUADLEN(len)*4)
if (dlen < XDR_QUADLEN(len)*4)
return 0;

rqstp->rq_vec[0].iov_base = (void*)p;
Expand Down

0 comments on commit aadc197

Please sign in to comment.