mwifiex: pcie: tighten a check in mwifiex_pcie_process_event_ready()

commit 01eca28428 upstream.

If "evt_len" is 1 then we try to memcpy() negative 3 bytes and it would
cause memory corruption.

Fixes: d930faee14 ("mwifiex: add support for Marvell pcie8766 chipset")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Dan Carpenter 2018-04-05 14:17:19 +03:00 • committed by Ben Hutchings
commit 78100750ec