Skip to content

Commit

Permalink
NFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes
Browse files Browse the repository at this point in the history
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: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Szymon Janc authored and Samuel Ortiz committed Oct 26, 2012
1 parent 7ad3939 commit 460d8f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/nci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 460d8f9

Please sign in to comment.