Skip to content

Commit

Permalink
Merge tag 'nfc-fixes-3.17-1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/sameo/nfc-fixes

Samuel Ortiz <[email protected]> says:

"NFC: 3.17 fixes

We have 3 NFC fixes for 3.17:

- 2 potential build failures for ST21NFCA and ST21NFCB, triggered by a
  depmod dependenyc cycle.
- One potential buffer overflow in the microread driver."

Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
linvjw committed Sep 22, 2014
2 parents dda3b19 + 300c627 commit 5c244fa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 12 additions & 4 deletions drivers/nfc/microread/microread.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,19 +501,27 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
skb->data[MICROREAD_EMCF_A_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
targets->nfcid1_len);
break;
case MICROREAD_GATE_ID_MREAD_ISO_A_3:
targets->supported_protocols =
nfc_hci_sak_to_protocol(skb->data[MICROREAD_EMCF_A3_SAK]);
targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
skb->data[MICROREAD_EMCF_A3_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
targets->nfcid1_len);
break;
case MICROREAD_GATE_ID_MREAD_ISO_B:
targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
Expand Down
5 changes: 3 additions & 2 deletions drivers/nfc/st21nfca/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Makefile for ST21NFCA HCI based NFC driver
#

st21nfca_i2c-objs = i2c.o
st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o

obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o
st21nfca_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o
5 changes: 3 additions & 2 deletions drivers/nfc/st21nfcb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Makefile for ST21NFCB NCI based NFC driver
#

st21nfcb_i2c-objs = i2c.o
st21nfcb_nci-objs = ndlc.o st21nfcb.o
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o

obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o
st21nfcb_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o

0 comments on commit 5c244fa

Please sign in to comment.