[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190928000655.27507-1-yzhai003@ucr.edu>
Date: Fri, 27 Sep 2019 17:06:51 -0700
From: Yizhuo <yzhai003@....edu>
To: unlisted-recipients:; (no To-header on input)
Cc: csong@...ucr.edu, zhiyunq@...ucr.edu, Yizhuo <yzhai003@....edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hariprasad Kelam <hariprasad.kelam@...il.com>,
Jeeeun Evans <jeeeunevans@...il.com>,
Larry Finger <Larry.Finger@...inger.net>,
Puranjay Mohan <puranjay12@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8723bs: Variable rf_type in function rtw_cfg80211_init_wiphy() could be uninitialized
In function rtw_cfg80211_init_wiphy(), local variable "rf_type" could
be uninitialized if function rtw_hal_get_hwreg() fails to initialize
it. However, this value is used in function rtw_cfg80211_init_ht_capab()
and used to decide the value writing to ht_cap, which is potentially
unsafe.
Signed-off-by: Yizhuo <yzhai003@....edu>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 9bc685632651..dd39a581b7ef 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3315,7 +3315,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
void rtw_cfg80211_init_wiphy(struct adapter *padapter)
{
- u8 rf_type;
+ u8 rf_type = RF_MAX_TYPE;
struct ieee80211_supported_band *bands;
struct wireless_dev *pwdev = padapter->rtw_wdev;
struct wiphy *wiphy = pwdev->wiphy;
--
2.17.1
Powered by blists - more mailing lists