aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs3xdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index e0e134d6baba..9147b8524d05 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -366,7 +366,8 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
366 len = args->len = ntohl(*p++); 366 len = args->len = ntohl(*p++);
367 367
368 hdr = (void*)p - rqstp->rq_arg.head[0].iov_base; 368 hdr = (void*)p - rqstp->rq_arg.head[0].iov_base;
369 if (rqstp->rq_arg.len < len + hdr) 369 if (rqstp->rq_arg.len < hdr ||
370 rqstp->rq_arg.len - hdr < len)
370 return 0; 371 return 0;
371 372
372 args->vec[0].iov_base = (void*)p; 373 args->vec[0].iov_base = (void*)p;