Address warning in createbss_hdl()

This commit is contained in:
kimocoder 2023-07-02 02:50:24 +02:00
parent ca797e114b
commit 6f7a4e568a

View File

@ -13941,14 +13941,14 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf)
flush_all_cam_entry(padapter); flush_all_cam_entry(padapter);
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network); pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
_rtw_memcpy(pnetwork, pdev_network, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); if (FIELD_OFFSET(WLAN_BSSID_EX, IELength) > MAX_IE_SZ) {
pnetwork->IELength = pdev_network->IELength;
if (pnetwork->IELength > MAX_IE_SZ) {
ret = H2C_PARAMETERS_ERROR; ret = H2C_PARAMETERS_ERROR;
goto ibss_post_hdl; goto ibss_post_hdl;
} }
memcpy(pnetwork, pdev_network, FIELD_OFFSET(WLAN_BSSID_EX, IELength));
pnetwork->IELength = pdev_network->IELength;
_rtw_memcpy(pnetwork->IEs, pdev_network->IEs, pnetwork->IELength); _rtw_memcpy(pnetwork->IEs, pdev_network->IEs, pnetwork->IELength);
start_create_ibss(padapter); start_create_ibss(padapter);
} else { } else {