Add check for psta->aid out of bounds.

This commit is contained in:
Christian B 2019-02-14 20:28:49 +01:00 committed by GitHub
parent bc1d897c54
commit b6bd52d317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -775,6 +775,10 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
pstapriv->sta_aid[psta->cmn.aid - 1] = NULL;
psta->cmn.aid = 0;
}
if (psta->aid > 31) {
pr_err("***** psta->aid (%d) out of bounds\n", psta->aid);
return _FAIL;
}
}
#endif /* CONFIG_NATIVEAP_MLME */