]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmc: ushc: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:40:22 +0000 (13:40 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 16 Mar 2017 14:31:27 +0000 (15:31 +0100)
commit181302dc7239add8ab1449c23ecab193f52ee6ab
tree6ac9e1a0bbcb741cd1029027d43aabd045a38e44
parent2ce0c7b65505e0d915e99389cced45b478dc935d
mmc: ushc: fix NULL-deref at probe

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.

Fixes: 53f3a9e26ed5 ("mmc: USB SD Host Controller (USHC) driver")
Cc: stable <stable@vger.kernel.org> # 2.6.37
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/ushc.c