diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-15 07:52:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-15 07:52:17 +0100 |
commit | b828324bba8f575fde487a91fec07303789dda8a (patch) | |
tree | 12b7d509d6bbb3657a87f1226b4eb593bfd5772d /drivers/staging/rtl8192u | |
parent | 0ba8b68b5b30ad3cba7ed8b6323ff6a127017ff4 (diff) | |
parent | 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff) |
Merge 5.12-rc3 into staging-next
We need the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_wx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index 175bb8b15389..5211b2005763 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -331,8 +331,10 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, struct iw_scan_req *req = (struct iw_scan_req *)b; if (req->essid_len) { - ieee->current_network.ssid_len = req->essid_len; - memcpy(ieee->current_network.ssid, req->essid, req->essid_len); + int len = min_t(int, req->essid_len, IW_ESSID_MAX_SIZE); + + ieee->current_network.ssid_len = len; + memcpy(ieee->current_network.ssid, req->essid, len); } } |