From c7cba7bd0043130bf9f646801905e66fc8f92eb5 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Fri, 24 May 2019 18:26:31 +0200 Subject: [PATCH] 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. --- core/rtw_mlme_ext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 29a4cb8..3666352 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -8999,12 +8999,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status /* setting auth algo number */ val16 = (u16)psta->authalg; - if (status != _STATS_SUCCESSFUL_) - val16 = 0; - if (val16) { val16 = cpu_to_le16(val16); use_shared_key = 1; + } else { + le_val16 = 0; } pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen));