From 8668e7cfbd08138d57bdfa40a4ec8c517b5d3b5f Mon Sep 17 00:00:00 2001 From: Pascal Brochart Date: Sat, 20 Jan 2024 13:29:00 +0100 Subject: [PATCH] Avoid field-overflowing memcpy() (#333) --- core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index d32a8e2..ceca650 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -4741,7 +4741,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui } /* fill default supported_mcs_set */ - memcpy(ht_capie.mcs.rx_mask, pmlmeext->default_supported_mcs_set, 16); + memcpy(&ht_capie.mcs, pmlmeext->default_supported_mcs_set, 16); /* update default supported_mcs_set */ rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));