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:
7ad3939
)
NFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes
author
Szymon Janc
<szymon.janc@tieto.com>
Thu, 4 Oct 2012 13:15:45 +0000
(15:15 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 26 Oct 2012 16:26:48 +0000
(18:26 +0200)
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>
net/nfc/nci/core.c
patch
|
blob
|
history
diff --git
a/net/nfc/nci/core.c
b/net/nfc/nci/core.c
index acf9abb7d99badc592592f83b42f4acbb14ef4de..77f49490e4cad6618d8f7347b072e7dd0f8919cc 100644
(file)
--- a/
net/nfc/nci/core.c
+++ b/
net/nfc/nci/core.c
@@
-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 > N
CI_MAX_PARAM
_LEN)
+ if (param.len > N
FC_MAX_GT
_LEN)
return -EINVAL;
for (i = 0; i < param.len; i++)