mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-27 23:54:24 +00:00
staging: prevent an underflow in rtw_check_beacon_data()
* The "len" could be as low as -14 so we should check for negatives.
This commit is contained in:
parent
8f04e62ca7
commit
c18b6668eb
@ -1931,8 +1931,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
if (!MLME_IS_AP(padapter) && !MLME_IS_MESH(padapter))
|
||||
return _FAIL;
|
||||
|
||||
|
||||
if (len > MAX_IE_SZ)
|
||||
if (len < 0 || len > MAX_IE_SZ)
|
||||
return _FAIL;
|
||||
|
||||
pbss_network->IELength = len;
|
||||
|
Loading…
Reference in New Issue
Block a user