提交 f844717c 编写于 作者: J Jes Sorensen 提交者: Greg Kroah-Hartman

staging: rtl8723au: rtw_cfg80211_inform_bss() fix Smatch warning

Check the size of pnetwork->network.IELenght correctly to avoid Smatch
warning.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 fbde4129
......@@ -260,7 +260,7 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
size_t notify_ielen;
s32 notify_signal;
u8 buf[MAX_BSSINFO_LEN], *pbuf;
size_t len, bssinf_len = 0;
size_t len;
struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl;
......@@ -270,11 +270,9 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
/* DBG_8723A("%s\n", __func__); */
bssinf_len =
pnetwork->network.IELength + sizeof(struct ieee80211_hdr_3addr);
if (bssinf_len > MAX_BSSINFO_LEN) {
if (pnetwork->network.IELength > MAX_IE_SZ) {
DBG_8723A("%s IE Length too long > %d byte\n", __func__,
MAX_BSSINFO_LEN);
MAX_IE_SZ);
goto exit;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册