projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a9a8b8
)
NFSv4.1: decode_getdeviceinfo should check xdr_read_pages() return value
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 1 Aug 2012 18:21:12 +0000
(14:21 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 26 Sep 2012 16:43:10 +0000
(12:43 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4xdr.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4xdr.c
b/fs/nfs/nfs4xdr.c
index 8dba6bd485578695fb791f8aa548bc8ac99b4391..a756349b0fa40b98a6caf2e3e7b88e23dd5787d4 100644
(file)
--- a/
fs/nfs/nfs4xdr.c
+++ b/
fs/nfs/nfs4xdr.c
@@
-5642,7
+5642,8
@@
static int decode_getdeviceinfo(struct xdr_stream *xdr,
* and places the remaining xdr data in xdr_buf->tail
*/
pdev->mincount = be32_to_cpup(p);
- xdr_read_pages(xdr, pdev->mincount); /* include space for the length */
+ if (xdr_read_pages(xdr, pdev->mincount) != pdev->mincount)
+ goto out_overflow;
/* Parse notification bitmap, verifying that it is zero. */
p = xdr_inline_decode(xdr, 4);