Messages in this thread Patch in this message | | | From | Dinghao Liu <> | Subject | [PATCH] Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode | Date | Fri, 24 Jul 2020 20:29:55 +0800 |
| |
The variable authmode will keep uninitialized if neither if statements used to initialize this variable are not triggered. Then authmode may contain a garbage value and influence the execution flow of this function.
Fix this by initializing it to zero.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 9de2d421f6b1..716f8d8a5c13 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -1711,7 +1711,7 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len) { - u8 authmode; + u8 authmode = 0; uint ielength; int iEntry; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -- 2.17.1
| |