aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoung Xiao <YangX92@hotmail.com>2018-11-27 09:12:20 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 09:56:09 +0100
commit87e4a5405f087427fbf8b437d2796283dce2b38f (patch)
tree3a9f6f00d5ff185d5820c7562a0c8b30df79a42f
parentstaging: rtl8712: Fix possible buffer overrun (diff)
downloadlinux-dev-87e4a5405f087427fbf8b437d2796283dce2b38f.tar.xz
linux-dev-87e4a5405f087427fbf8b437d2796283dce2b38f.zip
Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c"
pstapriv->max_num_sta is always <= NUM_STA, since max_num_sta is either set in _rtw_init_sta_priv() or rtw_set_beacon(). Fixes: ef9209b642f1 ("staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c") Signed-off-by: Young Xiao <YangX92@hotmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_mlme_ext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 69c7abc0e3a5..8445d516c93d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1565,7 +1565,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
if (pstat->aid > 0) {
DBG_871X(" old AID %d\n", pstat->aid);
} else {
- for (pstat->aid = 1; pstat->aid < NUM_STA; pstat->aid++)
+ for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++)
if (pstapriv->sta_aid[pstat->aid - 1] == NULL)
break;