NFC: microread: Potential overflows in microread_target_discovered()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Sep 2014 17:27:29 +0000 (20:27 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 4 Sep 2014 22:57:32 +0000 (00:57 +0200)
commitd07f1e8600ccb885c8f4143402b8912f7d827bcb
tree424bdab667951fb952c2cfe1951a1b028d1d0b59
parent1bd3fa7b8c9b2936c16c6e6452f9cc991c405872
NFC: microread: Potential overflows in microread_target_discovered()

Smatch says that skb->data is untrusted so we need to check to make sure
that the memcpy() doesn't overflow.

Fixes: cfad1ba87150 ('NFC: Initial support for Inside Secure microread')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/microread/microread.c