]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: check return value of xdr_inline_decode
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 06:49:41 +0000 (14:49 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 28 Apr 2017 17:06:59 +0000 (13:06 -0400)
commit3a4b912b547b5559691c1f7b760d4f3cdf8d9f2e
treedf89653068ba714a55f6e4429dc7269e1588a9d6
parenta65e801bc8a30c0769d485c410e94ea050fdfdfa
NFSv4: check return value of xdr_inline_decode

Function xdr_inline_decode() will return a NULL pointer if the input
buffer does not have long enough buffer to decode nbytes of data.
However, in function decode_op_map(), the return value of
xdr_inline_decode() is not validated before it is used. This patch adds
a check to the return value of xdr_inline_decode().

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4xdr.c