提交 13fe4ba1 编写于 作者: T Trond Myklebust

NFSv4.1: decode_getdeviceinfo should check xdr_read_pages() return value

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 8a9a8b83
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册