]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfs3xdr.c
[ARM] Remove unused dma.c files
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfs3xdr.c
index e0e134d6baba0013af5918f0dd0a4f9c3405b246..9147b8524d05262bd9f28b77c0e7636854367f09 100644 (file)
@@ -366,7 +366,8 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
        len = args->len = ntohl(*p++);
 
        hdr = (void*)p - rqstp->rq_arg.head[0].iov_base;
-       if (rqstp->rq_arg.len < len + hdr)
+       if (rqstp->rq_arg.len < hdr ||
+           rqstp->rq_arg.len - hdr < len)
                return 0;
 
        args->vec[0].iov_base = (void*)p;