projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e92706
)
device: Check for NFCID length being greater than zero
author
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 21 May 2012 16:33:21 +0000
(18:33 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sat, 26 May 2012 14:23:05 +0000
(16:23 +0200)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
34ef5a2
..
185da9a
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-328,7
+328,7
@@
struct near_device *__near_device_add(uint32_t adapter_idx, uint32_t target_idx,
device->target_idx = target_idx;
device->n_records = 0;
- if (nfcid_len <= NFC_MAX_NFCID1_LEN) {
+ if (nfcid_len <= NFC_MAX_NFCID1_LEN
&& nfcid_len > 0
) {
device->nfcid_len = nfcid_len;
memcpy(device->nfcid, nfcid, nfcid_len);
}