staging: r8188eu: memory corruption handling long ssids
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 6 Feb 2014 20:42:42 +0000 (23:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 17:19:30 +0000 (09:19 -0800)
commit7a081ea20e043f243b6fb9d50448cbe757fbb860
tree61ac41d402613b3246d01fe5fefbeb9acd5f5214
parentd3a874e899b073496d1fe89b6a2d1aa50870874d
staging: r8188eu: memory corruption handling long ssids

We should cap the SSID length at NDIS_802_11_LENGTH_SSID (32) characters
to avoid memory corruption.  If the SSID is too long then I have opted
to ignore it instead of truncating it.

We don't need to clear bssid->Ssid.Ssid[0] because this struct is
allocated with rtw_zmalloc()

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_wlan_util.c