]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/staging/rtl8188eu/core/rtw_ap.c
staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
[linux.git] / drivers / staging / rtl8188eu / core / rtw_ap.c
index 91156a21b8f2e181e879567b57255260892378c0..519b4d3584a27722db7f5a8f3be1f0bfeccf1fe7 100644 (file)
@@ -878,7 +878,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
                return _FAIL;
 
 
-       if (len > MAX_IE_SZ)
+       if (len < 0 || len > MAX_IE_SZ)
                return _FAIL;
 
        pbss_network->IELength = len;