From: Christophe Ricard Date: Sun, 10 Aug 2014 22:04:56 +0000 (+0200) Subject: NFC: st21nfca: Add condition to make sure atr_req->length is valid. X-Git-Tag: fixes-against-v3.18-rc2~144^2~39^2~72^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56f1ffcccd784672654918f9214979b4918c2544;p=pandora-kernel.git NFC: st21nfca: Add condition to make sure atr_req->length is valid. gb_len in st21nfca_tm_send_atr_res can be negative. Not checking for that could lead to a potential kernel oops. We now make sure that atr_req->length > sizeof(struct st21nfca_atr_req) to avoid such situation. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- Reading git-diff-tree failed