wl1251: Fix possible buffer overflow in wl1251_cmd_scan
authorLee Gibson <leegib@gmail.com>
Wed, 28 Apr 2021 11:55:08 +0000 (12:55 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 15 Jun 2021 13:35:52 +0000 (16:35 +0300)
commitd10a87a3535cce2b890897914f5d0d83df669c63
treee376365499d897df5f275559cf78c6eccbcbd8e8
parentd4f23164cff08de41abfd95ad8610b94137cdf9c
wl1251: Fix possible buffer overflow in wl1251_cmd_scan

Function wl1251_cmd_scan calls memcpy without checking the length.
Harden by checking the length is within the maximum allowed size.

Signed-off-by: Lee Gibson <leegib@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210428115508.25624-1-leegib@gmail.com
drivers/net/wireless/ti/wl1251/cmd.c