提交 460d8f97 编写于 作者: S Szymon Janc 提交者: Samuel Ortiz

NFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes

local_gb is of size NFC_MAX_GT_LEN and len is used as index for it.
Check len against this instead of NCI_MAX_PARAM_LEN before accessing
local_gb.
Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 7ad39395
......@@ -420,7 +420,7 @@ static int nci_set_local_general_bytes(struct nfc_dev *nfc_dev)
if ((param.val == NULL) || (param.len == 0))
return rc;
if (param.len > NCI_MAX_PARAM_LEN)
if (param.len > NFC_MAX_GT_LEN)
return -EINVAL;
for (i = 0; i < param.len; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册