diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 6d41be8..374082a 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -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;