Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Tue, 28 Jul 2020 07:21:51 +0000 (15:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:35:32 +0000 (15:35 +0200)
commitfa7afddeac0b49697763b300a9fea221eb353cc0
tree3a571f75dce60f603d2bdf9dafac4fc88578283a
parent3a8d0a1aa5cb13b6437f465c6e1201c23ebb0b4e
Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode

commit 11536442a3b4e1de6890ea5e805908debb74f94a upstream.

The variable authmode can be uninitialized. The danger would be if
it equals to _WPA_IE_ID_ (0xdd) or _WPA2_IE_ID_ (0x33). We can avoid
this by setting it to zero instead. This is the approach that was
used in the rtl8723bs driver.

Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4")
Co-developed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200728072153.9202-1-dinghao.liu@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme.c