From 6f7a4e568adbdc5031118263e585cc655ddcfb7e Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 2 Jul 2023 02:50:24 +0200 Subject: [PATCH] Address warning in createbss_hdl() --- core/rtw_mlme_ext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 01136fb..57e7536 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -13941,14 +13941,14 @@ u8 createbss_hdl(_adapter *padapter, u8 *pbuf) flush_all_cam_entry(padapter); pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network); - _rtw_memcpy(pnetwork, pdev_network, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); - pnetwork->IELength = pdev_network->IELength; - - if (pnetwork->IELength > MAX_IE_SZ) { + if (FIELD_OFFSET(WLAN_BSSID_EX, IELength) > MAX_IE_SZ) { ret = H2C_PARAMETERS_ERROR; 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); start_create_ibss(padapter); } else {