rtl8188eu: Fix uninitialized variable in auth seq=2 packet

An unintialized value for a temporary little-endian variable can cause some
clients to fail to connect to AP.

Reported-by: pepa-cz.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2019-02-27 09:28:10 -06:00
parent bae8932732
commit fca9048241

View file

@ -8176,12 +8176,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status
/* setting auth algo number */ /* setting auth algo number */
val16 = (u16)psta->authalg; val16 = (u16)psta->authalg;
if (status != _STATS_SUCCESSFUL_)
le_val16 = 0;
if (val16) { if (val16) {
le_val16 = cpu_to_le16(val16); le_val16 = cpu_to_le16(val16);
use_shared_key = 1; use_shared_key = 1;
} else {
le_val16 = 0;
} }
pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&le_val16, &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&le_val16, &(pattrib->pktlen));