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

staging: rtl8723au: process_80211d(): Fix order of advancing array pos

Fix smatch warning from advancing array index before reading out the
value of the array.
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>
上级 79a76349
......@@ -4867,9 +4867,9 @@ static void process_80211d(struct rtw_adapter *padapter,
if (!ie || ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN)
return;
ie += 2;
p = ie;
p = ie + 2;
ie += ie[1];
ie += 2;
memcpy(country, p, 3);
country[3] = '\0';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册