staging: wfx: check ssidlen and prevent an array overflow
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 24 Apr 2020 10:42:35 +0000 (13:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Apr 2020 10:59:22 +0000 (12:59 +0200)
commit87f86cddda65cab8a7e3df8a00e16abeccaa0730
tree85f8b23f7f1d9595a45a4189b4f76b73010accbf
parent705b7c364808de23f067c128afb295e5f0d8da24
staging: wfx: check ssidlen and prevent an array overflow

We need to cap "ssidlen" to prevent a memcpy() overflow.

Fixes: 40115bbc40e2 ("staging: wfx: implement the rest of mac80211 API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200424104235.GA416402@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/sta.c