alistair23-linux/drivers/nfc/st21nfca
Christophe Ricard 9906a88df2 NFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy
st21nfca_get_iso14443_3_uid() does not correctly copy the uid from
uid_skb->data to its gate parameter. "gate = uid_skb->data;" only
puts a pointer to uid_skb->data to the local variable gate.
This means that in st21nfca_hci_target_from_gate() the content
of "u8 uid[NFC_NFCID1_MAXSIZE]" local variable is never initialized
before being used in memcpy(target->nfcid1, uid, len).

Fix this by replacing the local variable assignment with a memcpy.

This was found by compiling Linux with
"gcc -Wunused-but-set-parameter".

Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-04-06 00:17:02 +02:00
..
i2c.c NFC: st21nfca: Adding support for secure element 2015-01-28 00:03:36 +01:00
Kconfig
Makefile NFC: st21nfca: Adding support for secure element 2015-01-28 00:03:36 +01:00
st21nfca.c NFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy 2015-04-06 00:17:02 +02:00
st21nfca.h NFC: st21nfca: Adding support for secure element 2015-01-28 00:03:36 +01:00
st21nfca_dep.c NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate. 2014-12-02 02:02:00 +01:00
st21nfca_dep.h NFC: st21nfca: Rework st21nfca_hci_event_received to route event to relevent gate. 2014-12-02 02:02:00 +01:00
st21nfca_se.c NFC: st21nfca: Add HCI transaction event support 2015-02-02 21:50:42 +01:00
st21nfca_se.h NFC: st21nfca: Adding support for secure element 2015-01-28 00:03:36 +01:00